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

Joel Sherril joel at rtems.org
Thu Sep 3 20:42:47 UTC 2015


Module:    rtems
Branch:    master
Commit:    28a870c47f66d946a6d94887120432be37441cdb
Changeset: http://git.rtems.org/rtems/commit/?id=28a870c47f66d946a6d94887120432be37441cdb

Author:    Martin Galvan <martin.galvan at tallertechnologies.com>
Date:      Thu Sep  3 15:25:35 2015 -0500

cpukit/libnetworking/rtems/rtems_dhcp.c: Fix compilation error

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 */



More information about the vc mailing list