RR(XS): JDK-6969276 minor memory leak detected by cppcheck in agent/src/os/linux/symtab.c
Dmitry Samersoff
dmitry.samersoff at oracle.com
Fri Nov 29 15:08:32 PST 2013
Ivan,
Good catch.
Thank you!
-Dmitry
On 2013-11-30 00:59, Ivan Gerasimov wrote:
> Hi Dmitry!
>
> I think you should surround the if body with braces, or you'll get
> unconditional return from the function otherwise.
>
> 217 if (last_slash == NULL)
> 218 free(debug_pathname);
> 219 return -1;
>
>
> Should be
>
> 217 if (last_slash == NULL) {
> 218 free(debug_pathname);
> 219 return -1;
> 220 }
>
>
> Sincerely yours,
> Ivan
>
>
> On 25.11.2013 21:49, 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
>>
>
--
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