xiaoxiang781216 commented on code in PR #2027:
URL: https://github.com/apache/nuttx-apps/pull/2027#discussion_r1315052931
##########
wireless/wapi/src/wireless.c:
##########
@@ -1337,16 +1339,16 @@ int wapi_scan_coll(int sock, FAR const char *ifname,
FAR char *tmp;
buflen *= 2;
- tmp = realloc(buf, buflen);
+ tmp = malloc(buflen);
+ free(buf);
Review Comment:
Yes, since the call change from realloc to malloc. realloc is bad here since
we don't need keep the content in old memory.
--
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]