# HG changeset patch # User dsamersoff # Date 1387393797 -14400 # Node ID 27c84ba76954890cec93b4437d482ae64fc10e2a # Parent 03e9e2e3028b7bcc564007958ed28049ebc8176b 6969276: minor memory leak detected by cppcheck in agent/src/os/linux/symtab.c Summary: missed free call on error return Reviewed-by: sla, sspitsyn, igerasim diff -r 03e9e2e3028b -r 27c84ba76954 agent/src/os/linux/symtab.c --- a/agent/src/os/linux/symtab.c Wed Dec 18 20:32:46 2013 +0400 +++ b/agent/src/os/linux/symtab.c Wed Dec 18 23:09:57 2013 +0400 @@ -214,8 +214,10 @@ + 2); strcpy(debug_pathname, name); char *last_slash = strrchr(debug_pathname, '/'); - if (last_slash == NULL) + if (last_slash == NULL) { + free(debug_pathname); return -1; + } /* Look in the same directory as the object. */ strcpy(last_slash+1, debug_filename);