Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5f8117f

Browse files
committed
Properly copy the preferred nodes array into our definition
Without this, we end up with zend_mm_heap issues.
1 parent b439154 commit 5f8117f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis_commands.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4184,7 +4184,7 @@ void redis_setoption_handler(INTERNAL_FUNCTION_PARAMETERS,
41844184
zend_hash_destroy(c->preferred_nodes);
41854185
FREE_HASHTABLE(c->preferred_nodes);
41864186
}
4187-
c->preferred_nodes = Z_ARRVAL_P(val);
4187+
c->preferred_nodes = zend_array_dup(Z_ARRVAL_P(val));
41884188
RETURN_TRUE;
41894189
EMPTY_SWITCH_DEFAULT_CASE()
41904190
}

0 commit comments

Comments
 (0)