From: Oliver Kurth Date: Mon, 20 Aug 2018 19:48:08 +0000 (-0700) Subject: Use ToolsCmd_FreeRPC() to free the memory instead of vm_free. X-Git-Tag: stable-11.0.0~469 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=034695e2d34df7b1a4e44ab8a871ba4799dfac81;p=thirdparty%2Fopen-vm-tools.git Use ToolsCmd_FreeRPC() to free the memory instead of vm_free. There exists a function ToolsCmd_FreeRPC that can be called to free the memory allocated from the ToolsCmd_SendRPC function call. At few places in the code, vm_free is used to free the memory. Replaced those references with ToolsCmd_FreeRPC. --- diff --git a/open-vm-tools/toolbox/toolboxcmd-info.c b/open-vm-tools/toolbox/toolboxcmd-info.c index 6dfb843af..10903ec22 100644 --- a/open-vm-tools/toolbox/toolboxcmd-info.c +++ b/open-vm-tools/toolbox/toolboxcmd-info.c @@ -79,7 +79,7 @@ InfoSendNetworkXdr(GuestNicProto *message, g_warning("%s: update failed: request \"%s\", reply \"%s\".\n", __FUNCTION__, request, reply); } - vm_free(reply); + ToolsCmd_FreeRPC(reply); } DynXdr_Destroy(&xdrs, TRUE); diff --git a/open-vm-tools/toolbox/toolboxcmd-time.c b/open-vm-tools/toolbox/toolboxcmd-time.c index d7848f120..c056de429 100644 --- a/open-vm-tools/toolbox/toolboxcmd-time.c +++ b/open-vm-tools/toolbox/toolboxcmd-time.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2008-2017 VMware, Inc. All rights reserved. + * Copyright (C) 2008-2018 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -28,7 +28,6 @@ #include "vmware/guestrpc/tclodefs.h" #include "vmware/guestrpc/timesync.h" #include "vmware/tools/i18n.h" -#include "vmware/tools/utils.h" /* @@ -118,7 +117,7 @@ TimeSyncEnable(void) ret = EXIT_FAILURE; } - vm_free(reply); + ToolsCmd_FreeRPC(reply); return ret; } @@ -154,7 +153,7 @@ TimeSyncDisable(void) ret = EXIT_FAILURE; } - vm_free(reply); + ToolsCmd_FreeRPC(reply); return ret; }