Skip to content

Commit

Permalink
do not make references indirect in var_replace
Browse files Browse the repository at this point in the history
workaround for #94, possibly at the expense of leaking a bit of memory?
  • Loading branch information
Marlies Heijkoop authored and Sean-Der committed Dec 7, 2016
1 parent 5c9870c commit e932088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion msgpack_unpack.c
Expand Up @@ -92,7 +92,7 @@ static zval *msgpack_var_push(msgpack_unserialize_data_t *var_hashx) /* {{{ */ {
/* }}} */

static inline void msgpack_var_replace(zval *old, zval *new) /* {{{ */ {
if (!MSGPACK_IS_STACK_VALUE(old)) {
if (!MSGPACK_IS_STACK_VALUE(old) && Z_TYPE_P(old) != IS_REFERENCE) {
ZVAL_INDIRECT(old, new);
}
}
Expand Down

0 comments on commit e932088

Please sign in to comment.