xiaoxiang781216 commented on a change in pull request #904:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/904#discussion_r758027697



##########
File path: netutils/dhcpc/dhcpc.c
##########
@@ -468,15 +512,15 @@ FAR void *dhcpc_open(FAR const char *interface, FAR const 
void *macaddr,
 
   /* Allocate an internal DHCP structure */
 
-  pdhcpc = (FAR struct dhcpc_state_s *)malloc(sizeof(struct dhcpc_state_s));
+  pdhcpc = malloc(sizeof(struct dhcpc_state_s) + maclen + 1);

Review comment:
       change + 1 to - 1




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to