RFR(S): JDK-8145698 Memory leak in add_lib_info_fd of libproc_impl.c:174
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Thu Jan 14 10:31:23 UTC 2016
The fix looks good.
However, it seems, there check at the lines 172 or 218 could be done
before the call to the calloc().
In such a case, there would be no need to free the new_lib.
It can be like this:
if (strlen(libname) >= BUF_SIZE - 1) {
print_debug("libname %s too long\n", libname);
return NULL;
}
Thanks,
Serguei
On 1/14/16 01:47, Dmitry Samersoff wrote:
> Everybody,
>
> Please review the fix:
>
> http://cr.openjdk.java.net/~dsamersoff/JDK-8145698/webrev.01/
>
> added missed free() call.
>
> -Dmitry
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20160114/a8b3d7d0/attachment.html>
More information about the serviceability-dev
mailing list