]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
[asyncsocket] Coverity Fixes
authorJohn Wolfe <jwolfe@vmware.com>
Thu, 8 Sep 2022 21:51:40 +0000 (14:51 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Thu, 8 Sep 2022 21:51:40 +0000 (14:51 -0700)
asyncsocket.c
- dereferencing null pointer (asock); false positive.

open-vm-tools/lib/asyncsocket/asyncsocket.c

index 6053a3bdb5196eb76e7b41715ae29275e996edd4..247b44330aa4a6a35be75ac779777d4ae47a9fb8 100644 (file)
@@ -3456,6 +3456,12 @@ AsyncTCPSocketSendWithFd(AsyncSocket *base,         // IN:
          AsyncTCPSocketAddRef(asock);
          asock->inLowLatencySendCb++;
          asock->internalSendFn((void *)asock);
+         /*
+          * Coverity warns that asock->internalSendFn may free asock. This is a
+          * false positive because this is a reference counted object and we've
+          * added a reference a few lines above.
+          */
+         /* coverity[deref_after_free:FALSE] */
          asock->inLowLatencySendCb--;
          AsyncTCPSocketRelease(asock);
       } else {