提交 1dd53e9e 编写于 作者: C Cary Xu

fix: return data ptr when iterate remove for simple hash

上级 36d6b1e5
......@@ -295,7 +295,11 @@ int32_t tSimpleHashIterateRemove(SSHashObj *pHashObj, const void *key, size_t ke
}
if (*pIter == (void *)GET_SHASH_NODE_DATA(pNode)) {
*pIter = pPrev;
if (!pPrev) {
*pIter = NULL;
} else {
*pIter = GET_SHASH_NODE_DATA(pPrev);
}
}
FREE_HASH_NODE(pNode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册