]> granicus.if.org Git - php/commitdiff
Fix memory leak on branch
authorAnthony Ferrara <ircmaxell@ircmaxell.com>
Mon, 25 Jun 2012 03:36:09 +0000 (23:36 -0400)
committerAnthony Ferrara <ircmaxell@ircmaxell.com>
Mon, 25 Jun 2012 03:36:09 +0000 (23:36 -0400)
ext/standard/password.c

index 665e69f28ce3b659ec7e64c8ce421e5be0702117..2b7e7dfc9378a0689b3dbba48790dfe90d79a38c 100644 (file)
@@ -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;