fix resource leak in dnodeVWrite.c

[TD-445]
This commit is contained in:
Shuduo Sang 2020-05-29 11:38:16 +08:00
parent 6a7da09d7f
commit 0b096647f0
1 changed files with 4 additions and 1 deletions

View File

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