Merge pull request #5729 from taosdata/fix/TD-3710

[TD-3710]<fix>: [sync/memory] fix peer connection invalid read post f…
This commit is contained in:
Shengliang Guan 2021-04-09 09:54:01 +08:00 committed by GitHub
commit 76f3837de0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -551,7 +551,10 @@ static void syncClosePeerConn(SSyncPeer *pPeer) {
if (pPeer->peerFd >= 0) {
pPeer->peerFd = -1;
void *pConn = pPeer->pConn;
if (pConn != NULL) syncFreeTcpConn(pPeer->pConn);
if (pConn != NULL) {
syncFreeTcpConn(pPeer->pConn);
pPeer->pConn = NULL;
}
}
}