diff --git a/src/system/detail/src/vnodeShell.c b/src/system/detail/src/vnodeShell.c index 4943eb1da90529bf2a8cc8f069299e54cf7dabf3..4732867d7eb2d6c88fd222e0094d34629d6465bb 100644 --- a/src/system/detail/src/vnodeShell.c +++ b/src/system/detail/src/vnodeShell.c @@ -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));