fix: return data ptr when iterate remove for simple hash
This commit is contained in:
parent
36d6b1e560
commit
1dd53e9e41
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue