Skip to content

More tests pass now #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 4, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed memory leak
  • Loading branch information
laruence authored and rlerdorf committed Feb 4, 2015
commit 6851bdd95f2a0f776fc55b4be8a43e2993a1268e
13 changes: 3 additions & 10 deletions php_memcached.c
Original file line number Diff line number Diff line change
Expand Up @@ -2548,16 +2548,9 @@ uint32_t *s_zval_to_uint32_array (zval *input, size_t *num_elements)

if (Z_TYPE_P(pzval) == IS_LONG) {
value = Z_LVAL_P(pzval);
}
else {
zval *tmp_zval, *tmp_pzval;
tmp_zval = pzval;
zval_copy_ctor(tmp_zval);
tmp_pzval = tmp_zval;
convert_to_long(tmp_pzval);

value = (Z_LVAL_P(tmp_pzval) > 0) ? Z_LVAL_P(tmp_pzval) : 0;
zval_dtor(tmp_pzval);
} else {
value = zval_get_long(pzval);
value = value > 0? value : 0;
}

if (value < 0) {
Expand Down