]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Guestinfo: fix memory leak detected by valgrind
authorVMware, Inc <>
Mon, 15 Oct 2012 04:54:06 +0000 (21:54 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Fri, 19 Oct 2012 18:32:41 +0000 (11:32 -0700)
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/slashProc/net.c
open-vm-tools/services/plugins/guestInfo/getlib/guestInfo.c

index a8c2a63ce85785b78de986fe992d5bf825a1bb24..f0dbaa174c2b3a6548e76aca1119b9f88cdad52a 100644 (file)
@@ -783,7 +783,7 @@ badIteration:
    }
 
    if (myArray && myIoStatus != G_IO_STATUS_EOF) {
-      g_ptr_array_free(myArray, TRUE);
+      SlashProcNet_FreeRoute6(myArray);
       myArray = NULL;
    }
 
index e359b74d9c11262a13a4d8474b829a7e6d16bddf..0f339974ac876496bfa8a1261bfb48c64d6f2f9f 100644 (file)
@@ -106,7 +106,7 @@ GuestInfo_GetNicInfo(NicInfoV3 **nicInfo)
 
    retval = GuestInfoGetNicInfo(*nicInfo);
    if (!retval) {
-      free(*nicInfo);
+      GuestInfo_FreeNicInfo(*nicInfo);
       *nicInfo = NULL;
    }