提交 e12f765b 编写于 作者: H hjxilinx

fix the bug of deref the qhandle

上级 b252163e
......@@ -215,7 +215,7 @@ void vnodeCloseShellVnode(int vnode) {
if (shellList[vnode] == NULL) return;
for (int i = 0; i < vnodeList[vnode].cfg.maxSessions; ++i) {
vnodeFreeQInfo(shellList[vnode][i].qhandle, true);
vnodeDecRefCount(shellList[vnode][i].qhandle);
}
int32_t* v = malloc(sizeof(int32_t));
......@@ -369,8 +369,10 @@ int vnodeProcessQueryRequest(char *pMsg, int msgLen, SShellObj *pObj) {
if (pObj->qhandle) {
dTrace("QInfo:%p %s free qhandle", pObj->qhandle, __FUNCTION__);
vnodeFreeQInfo(pObj->qhandle, true);
void* qHandle = pObj->qhandle;
pObj->qhandle = NULL;
vnodeDecRefCount(qHandle);
}
if (QUERY_IS_STABLE_QUERY(pQueryMsg->queryType)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册