mirror of https://mirror.osredm.com/root/redis.git
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
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 New Issue