pkarashchenko commented on code in PR #2027:
URL: https://github.com/apache/nuttx-apps/pull/2027#discussion_r1314833346
##########
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:
Do we need to free only if allocation succeededs or unconditionally?
--
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]