fix bugs of releasing qhandle

This commit is contained in:
hjxilinx 2020-01-18 14:29:05 +08:00
parent 59bb8b3c90
commit bde973221f
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));