RFR(S): JDK-8145698 Memory leak in add_lib_info_fd of libproc_impl.c:174
Dmitry Samersoff
dmitry.samersoff at oracle.com
Sat Jan 16 09:57:17 UTC 2016
Serguei,
Correct. But I would prefer to keep original code as is.
-Dmitry
On 2016-01-14 13:31, serguei.spitsyn at oracle.com wrote:
> 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
>>
>
--
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the serviceability-dev
mailing list