com php-src: fix leak: ext/ldap/ldap.c
| From: | Anatol Belski | Date: | Mon, 29 Aug 2016 16:01:21 +0000 |
| Subject: | com php-src: fix leak: ext/ldap/ldap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94117@lists.php.net to get a copy of this message | ||
Commit: e2609a38d9604d9daea5e4a31a6fb13d1cc24ab5
Author: Anatol Belski <ab@php.net> Mon, 29 Aug 2016 18:01:21 +0200
Parents: c73bcbefbd74c650b48caef7e475502c1ef96c90
Branches: PHP-5.6 PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e2609a38d9604d9daea5e4a31a6fb13d1cc24ab5
Log:
fix leak
Changed paths:
M ext/ldap/ldap.c
Diff:
diff --git a/ext/ldap/ldap..c b/ext/ldap/ldap.c
index 5ffc17b..e709e59 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -367,6 +367,7 @@ PHP_FUNCTION(ldap_connect)
int urllen = hostlen + sizeof( "ldap://:65535" );
if (port <= 0 || port > 65535) {
+ efree(ld);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid port number: %ld", port);
RETURN_FALSE;
}