Merge pull request #2531 from taosdata/hotfix/fix_rpc_issue

fixbug use_after_free
This commit is contained in:
Shengliang Guan 2020-07-02 14:30:34 +08:00 committed by GitHub
commit 8a24b8993d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1529,10 +1529,10 @@ static void rpcAddRef(SRpcInfo *pRpc)
static void rpcDecRef(SRpcInfo *pRpc)
{
if (atomic_sub_fetch_32(&pRpc->refCount, 1) == 0) {
rpcCloseConnCache(pRpc->pCache);
taosHashCleanup(pRpc->hash);
taosTmrCleanUp(pRpc->tmrCtrl);
taosIdPoolCleanUp(pRpc->idPool);
rpcCloseConnCache(pRpc->pCache);
tfree(pRpc->connList);
pthread_mutex_destroy(&pRpc->mutex);