[PATCH] cpukit/libnetworking/rtems/rtems_dhcp.c: Fix compilation error

Daniel Gutson daniel.gutson at tallertechnologies.com
Thu Sep 3 21:13:01 UTC 2015


On Thu, Sep 3, 2015 at 5:44 PM, Joel Sherrill <joel.sherrill at oarcorp.com> wrote:
> Should be committed now.
>
> I guess one of us should have compiled it. :)

Don't worry, Martin will buy some beers because of this.
Cheers.

  Daniel.

>
> --joel
>
> On 9/3/2015 3:25 PM, Martin Galvan wrote:
>>
>> Apparently 'free' is defined as a macro which takes two arguments and
>> calls
>> rtems_bsdnet_free. When fixing #2405 I added a missing 'free' but didn't
>> notice
>> it was non-standard.
>>
>> Closes #2410.
>> ---
>>   cpukit/libnetworking/rtems/rtems_dhcp.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/cpukit/libnetworking/rtems/rtems_dhcp.c
>> b/cpukit/libnetworking/rtems/rtems_dhcp.c
>> index 87be238..cb6966d 100644
>> --- a/cpukit/libnetworking/rtems/rtems_dhcp.c
>> +++ b/cpukit/libnetworking/rtems/rtems_dhcp.c
>> @@ -405,7 +405,7 @@ process_options (unsigned char *optbuf, int
>> optbufSize)
>>               strncpy (dhcp_hostname, p, len);
>>             } else {  /* realloc failed */
>>               printf ("dhcpc: realloc failed (%s:%d)", __FILE__,
>> __LINE__);
>> -            free (dhcp_hostname);
>> +            free (dhcp_hostname, 0);
>>               dhcp_hostname = NULL;
>>             }
>>           } else { /* dhcp_hostname == NULL */
>>
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel.sherrill at OARcorp.com        On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



-- 

Daniel F. Gutson
Chief Engineering Officer, SPD

San Lorenzo 47, 3rd Floor, Office 5
Córdoba, Argentina

Phone:   +54 351 4217888 / +54 351 4218211
Skype:    dgutson
LinkedIn: http://ar.linkedin.com/in/danielgutson



More information about the devel mailing list