]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
[tools] Cleanup RpcOut reply after send failure
authorOliver Kurth <okurth@vmware.com>
Fri, 27 Jul 2018 18:46:23 +0000 (11:46 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 27 Jul 2018 18:46:23 +0000 (11:46 -0700)
There is a path in RpcOut that does not clear the reply message
after a failure.  This can cause the invoker to trigger a free()
failure.

open-vm-tools/lib/rpcOut/rpcout.c

index a59ce66cd95a5c0b1cd4cea134e1fa52b8525159..b98dc92ba259bd9d1b6ba3e2b02d56fa6e622c9b 100644 (file)
@@ -439,7 +439,9 @@ RpcOutSendOneRawWork(void *request,         // IN: RPCI command
          memcpy(callerReply, myReply, s);
          callerReply[s] = '\0';
       }
-
+      if (reply != NULL) {
+         *reply = NULL;
+      }
       return FALSE;
    }