summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/session/mod_user.c12
-rw-r--r--ext/session/session.c3
2 files changed, 5 insertions, 10 deletions
diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index caa5773abd..32fc050a6a 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -58,14 +58,12 @@ static zval *ps_call_handler(zval *func, int argc, zval **argv)
MAKE_STD_ZVAL(retval);
if (call_user_function(EG(function_table), NULL, func, retval,
argc, argv) == FAILURE) {
- zval_dtor(retval);
- FREE_ZVAL(retval);
+ zval_ptr_dtor(&retval);
retval = NULL;
}
for (i = 0; i < argc; i++) {
- zval_dtor(argv[i]);
- FREE_ZVAL(argv[i]);
+ zval_ptr_dtor(&argv[i]);
}
return retval;
@@ -84,8 +82,7 @@ static zval *ps_call_handler(zval *func, int argc, zval **argv)
if (retval) { \
convert_to_long(retval); \
ret = retval->value.lval; \
- zval_dtor(retval); \
- FREE_ZVAL(retval); \
+ zval_ptr_dtor(&retval); \
} \
return ret
@@ -133,8 +130,7 @@ PS_READ_FUNC(user)
*vallen = retval->value.str.len;
ret = SUCCESS;
}
- zval_dtor(retval);
- FREE_ZVAL(retval);
+ zval_ptr_dtor(&retval);
}
return ret;
diff --git a/ext/session/session.c b/ext/session/session.c
index 5af87a142f..f0bdbdd75c 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -477,8 +477,7 @@ PS_SERIALIZER_DECODE_FUNC(wddx)
}
}
- zval_dtor(retval);
- FREE_ZVAL(retval);
+ zval_ptr_dtor(&retval);
return ret;
}