]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commit
Properly free the memory when RpcChannel_Send() fails.
authorOliver Kurth <okurth@vmware.com>
Mon, 20 Aug 2018 19:48:07 +0000 (12:48 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 20 Aug 2018 19:48:07 +0000 (12:48 -0700)
commit251ca7762ecddfe052f3b8f2c879a9fcb714fb4c
tree99d572ef855f3a35dd0f1d409f1e94e7df578963
parent62ee46c7748f9003904c5973da851994566f7214
Properly free the memory when RpcChannel_Send() fails.

At few places in the code, when RpcChannel_Send() function fails,
the result (fourth argument to the function) is not freed which might
result in a memory leak.

Addressed few references by adding 'RpcChannel_Free(...)' calls
in the necessary error code paths.

For toolbox-cmd application, added a new function ToolsCmd_FreeRPC
which internally calls RpcChannel_Free function to free the memory
allocated from ToolsCmd_SendRPC calls. Modified toolboxcmd-shrink.c
to use the new function to free the memory.
open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c
open-vm-tools/toolbox/toolbox-cmd.c
open-vm-tools/toolbox/toolboxCmdInt.h
open-vm-tools/toolbox/toolboxcmd-shrink.c