com php-src: Clean up unreported memory leak by switching to zval_ptr_dtor: ext/standard/password.c
| From: | Anthony Ferrara | Date: | Sun, 07 Oct 2012 09:12:02 +0000 |
| Subject: | com php-src: Clean up unreported memory leak by switching to zval_ptr_dtor: ext/standard/password.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70349@lists.php.net to get a copy of this message | ||
Commit: 37b2207f66ac1cebdc3ff3f7f88ec319ee893292
Author: Anthony Ferrara <ircmaxell@gmail.com> Sun, 7 Oct 2012 05:12:02 -0400
Parents: 76e83f769ff5929b45cf0ac666335ce68ada166f
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=37b2207f66ac1cebdc3ff3f7f88ec319ee893292
Log:
Clean up unreported memory leak by switching to zval_ptr_dtor
Changed paths:
M ext/standard/password.c
Diff:
diff --git a/ext/standard/password.c b/ext/standard/password.c
index 70004a9..3507183 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -250,7 +250,7 @@ PHP_FUNCTION(password_needs_rehash)
MAKE_COPY_ZVAL(option_buffer, cast_option_buffer);
convert_to_long(cast_option_buffer);
new_cost = Z_LVAL_P(cast_option_buffer);
- zval_dtor(cast_option_buffer);
+ zval_ptr_dtor(&cast_option_buffer);
} else {
new_cost = Z_LVAL_PP(option_buffer);
}
@@ -331,7 +331,7 @@ PHP_FUNCTION(password_hash)
MAKE_COPY_ZVAL(option_buffer, cast_option_buffer);
convert_to_long(cast_option_buffer);
cost = Z_LVAL_P(cast_option_buffer);
- zval_dtor(cast_option_buffer);
+ zval_ptr_dtor(&cast_option_buffer);
} else {
cost = Z_LVAL_PP(option_buffer);
}
@@ -373,10 +373,10 @@ PHP_FUNCTION(password_hash)
if (Z_TYPE_P(cast_option_buffer) == IS_STRING) {
buffer = estrndup(Z_STRVAL_P(cast_option_buffer), Z_STRLEN_P(cast_option_buffer));
buffer_len_int = Z_STRLEN_P(cast_option_buffer);
- zval_dtor(cast_option_buffer);
+ zval_ptr_dtor(&cast_option_buffer);
break;
}
- zval_dtor(cast_option_buffer);
+ zval_ptr_dtor(&cast_option_buffer);
}
case IS_BOOL:
case IS_NULL: