jerpelea opened a new pull request, #19843: URL: https://github.com/apache/nuttx/pull/19843
## Summary * According to strdup(3) manual strdup() allocates memory with malloc(3) and that memory should be released with free(3) when no longer needed. * For non existent path or file open error mkversion used exit() with no prior free() for allocated memory. * This change introduces ret variable, exit label, and free on exit in order to avoid potential memory leak. * tools/mkversion is a tiny short-lived utility and the memory gets freed by the OS upon application termination so that was not a bit issue, but now memory leak scanners should be happy as we have free() in pair to strdup(). ## Impact RELEASE ## Testing CI -- 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]
