[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR(S): JDK-8145698 Memory leak in add_lib_info_fd of libproc_impl.c:174
From:       Dmitry Samersoff <dmitry.samersoff () oracle ! com>
Date:       2016-01-16 9:57:17
Message-ID: 569A13FD.4090903 () oracle ! com
[Download RAW message or body]

Serguei,

Correct. But I would prefer to keep original code as is.

-Dmitry

On 2016-01-14 13:31, serguei.spitsyn@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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic