Merge pull request #2071 from taosdata/hotfix/sangshuduo/fix-resource-leak-in-dnodeVWrite.c

fix resource leak in dnodeVWrite.c
This commit is contained in:
Shengliang Guan 2020-05-29 16:30:32 +08:00 committed by GitHub
commit 2ad443a172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -129,7 +129,10 @@ void *dnodeAllocateVnodeWqueue(void *pVnode) {
if (pWorker->qset == NULL) {
pWorker->qset = taosOpenQset();
if (pWorker->qset == NULL) return NULL;
if (pWorker->qset == NULL) {
taosCloseQueue(queue);
return NULL;
}
taosAddIntoQset(pWorker->qset, queue, pVnode);
pWorker->qall = taosAllocateQall();