mirror of
https://github.com/redis/redis.git
synced 2026-06-09 08:55:06 -04:00
Fix VADD_CASReply() NULL reference on ID mismatch.
This bug was fixed thanks to the kind help of Dvir Dukhan (@DvirDukhan) that found it and provided useful context.
This commit is contained in:
parent
99176b3e04
commit
70ffa8ce5c
1 changed files with 2 additions and 1 deletions
3
vset.c
3
vset.c
|
|
@ -340,7 +340,8 @@ int VADD_CASReply(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
|
|||
* the other insert won. We don't even start a threaded VADD
|
||||
* if this was an udpate, since the deletion of the element itself
|
||||
* in order to perform the update would invalidate the CAS state. */
|
||||
if (RedisModule_DictGet(vset->dict,val,NULL) != NULL) vset = NULL;
|
||||
if (vset && RedisModule_DictGet(vset->dict,val,NULL) != NULL)
|
||||
vset = NULL;
|
||||
}
|
||||
|
||||
if (vset == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue