Added NULL check to function objFromAllocPtr, now NULL input will map to NULL output even if active replica is enabled
Former-commit-id: b67db7c2d5396892cc0c91c3c822a5b9a547badf
This commit is contained in:
parent
a2439842f6
commit
b9089ab13c
@ -1528,7 +1528,7 @@ void *allocPtrFromObj(robj_roptr o) {
|
||||
}
|
||||
|
||||
robj *objFromAllocPtr(void *pv) {
|
||||
if (g_pserver->fActiveReplica) {
|
||||
if (pv && g_pserver->fActiveReplica) {
|
||||
return reinterpret_cast<robj*>(reinterpret_cast<redisObjectExtended*>(pv)+1);
|
||||
}
|
||||
return reinterpret_cast<robj*>(pv);
|
||||
|
Loading…
x
Reference in New Issue
Block a user