From: John Wolfe Date: Thu, 8 Sep 2022 21:51:40 +0000 (-0700) Subject: [asyncsocket] Coverity Fixes X-Git-Tag: stable-12.2.0~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=900e24d53bca579d8ad6b12687daf670fb7fe5a6;p=thirdparty%2Fopen-vm-tools.git [asyncsocket] Coverity Fixes asyncsocket.c - dereferencing null pointer (asock); false positive. --- diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c index 6053a3bdb..247b44330 100644 --- a/open-vm-tools/lib/asyncsocket/asyncsocket.c +++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c @@ -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 {