From: VMware, Inc <> Date: Mon, 15 Oct 2012 04:54:06 +0000 (-0700) Subject: Guestinfo: fix memory leak detected by valgrind X-Git-Tag: 2012.10.14-874563~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a14f6d1297696ae8f3fdc854bec3bec3ee7ef88a;p=thirdparty%2Fopen-vm-tools.git Guestinfo: fix memory leak detected by valgrind Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/slashProc/net.c b/open-vm-tools/lib/slashProc/net.c index a8c2a63ce..f0dbaa174 100644 --- a/open-vm-tools/lib/slashProc/net.c +++ b/open-vm-tools/lib/slashProc/net.c @@ -783,7 +783,7 @@ badIteration: } if (myArray && myIoStatus != G_IO_STATUS_EOF) { - g_ptr_array_free(myArray, TRUE); + SlashProcNet_FreeRoute6(myArray); myArray = NULL; } diff --git a/open-vm-tools/services/plugins/guestInfo/getlib/guestInfo.c b/open-vm-tools/services/plugins/guestInfo/getlib/guestInfo.c index e359b74d9..0f339974a 100644 --- a/open-vm-tools/services/plugins/guestInfo/getlib/guestInfo.c +++ b/open-vm-tools/services/plugins/guestInfo/getlib/guestInfo.c @@ -106,7 +106,7 @@ GuestInfo_GetNicInfo(NicInfoV3 **nicInfo) retval = GuestInfoGetNicInfo(*nicInfo); if (!retval) { - free(*nicInfo); + GuestInfo_FreeNicInfo(*nicInfo); *nicInfo = NULL; }