diff -r 663c609dfeee -r f0d335e847c5 hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c --- a/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c Thu Jan 14 09:18:11 2016 +0100 +++ b/hotspot/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c Sat Jan 16 13:56:49 2016 +0300 @@ -171,6 +171,7 @@ if (strlen(libname) >= sizeof(newlib->name)) { print_debug("libname %s too long\n", libname); + free(newlib); return NULL; } strcpy(newlib->name, libname);