RR(XS): JDK-6969276 minor memory leak detected by cppcheck in agent/src/os/linux/symtab.c

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Mon Nov 25 12:00:01 PST 2013


Agreed.

Thanks,
Serguei

On 11/25/13 11:53 AM, Dmitry Samersoff wrote:
> Serguei,
>
> Thank you for the review.
>
> Actually, I don't see a reason to use malloc here - UNIX path is limited
> to 1024 bytes so it's possible to just allocate on-stack buffer and use
> snprintf to make sure we don't overflow it.
>
> But it's out of scope of this simple fix.
>
> -Dmitry
>
>
> On 2013-11-25 23:46, serguei.spitsyn at oracle.com wrote:
>> It looks good.
>> Checking 'name' instead of 'debug_name' before 'debug_name' is allocated
>> would be even better.
>> But it'd be a multi-line fix. :)
>>
>> Thanks,
>> Serguei
>> On 11/25/13 9:49 AM, Dmitry Samersoff wrote:
>>> Hi Everyone,
>>>
>>> Please review an XS fix - missed free() call discovered by cppcheck tool.
>>>
>>> http://cr.openjdk.java.net/~dsamersoff/JDK-6969276/webrev.01/
>>>
>>> -Dmitry
>>>
>



More information about the serviceability-dev mailing list