Merge pull request #1156 from taosdata/beta/v1.6.5.3

fix bugs of releasing qhandle
This commit is contained in:
plum-lihui 2020-01-18 15:53:20 +08:00 committed by GitHub
commit de19fbfc13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -215,7 +215,10 @@ void vnodeCloseShellVnode(int vnode) {
if (shellList[vnode] == NULL) return;
for (int i = 0; i < vnodeList[vnode].cfg.maxSessions; ++i) {
vnodeDecRefCount(shellList[vnode][i].qhandle);
void* qhandle = shellList[vnode][i].qhandle;
if (qhandle != NULL) {
vnodeDecRefCount(qhandle);
}
}
int32_t* v = malloc(sizeof(int32_t));