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

Ivan Gerasimov ivan.gerasimov at oracle.com
Fri Nov 29 12:59:10 PST 2013


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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20131130/49415635/attachment.html 


More information about the serviceability-dev mailing list