com php-src: Fix memory leak on branch: ext/standard/password.c
| From: | Anthony Ferrara | Date: | Mon, 25 Jun 2012 03:36:09 +0000 |
| Subject: | com php-src: Fix memory leak on branch: ext/standard/password.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70391@lists.php.net to get a copy of this message | ||
Commit: f7097d99ffedc6bd0965542454b4ac86e4b5c914
Author: Anthony Ferrara <ircmaxell@ircmaxell.com> Sun, 24 Jun 2012 23:36:09 -0400
Parents: 657402832b7884f52bf07b2e6f704510395fd413
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f7097d99ffedc6bd0965542454b4ac86e4b5c914
Log:
Fix memory leak on branch
Changed paths:
M ext/standard/password.c
Diff:
diff --git a/ext/standard/password.c b/ext/standard/password.c
index 665e69f..2b7e7df 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -246,6 +246,7 @@ PHP_FUNCTION(password_create)
salt = emalloc(required_salt_len + 1);
if (php_password_salt_to64(buffer, buffer_len, required_salt_len, salt) ==
FAILURE) {
efree(hash_format);
+ efree(salt);
zval_ptr_dtor(option_buffer);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too
short: %d", salt_len);
RETURN_FALSE;