Skip to content

Commit cb8e659

Browse files
committed
ext/ldap: fix leak on port overflow check.
1 parent c978111 commit cb8e659

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/ldap/ldap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ PHP_FUNCTION(ldap_connect)
994994
size_t urllen = hostlen + sizeof( "ldap://:65535" );
995995

996996
if (port <= 0 || port > 65535) {
997+
zval_ptr_dtor(return_value);
997998
zend_argument_value_error(2, "must be between 1 and 65535");
998999
RETURN_THROWS();
9991000
}

0 commit comments

Comments
 (0)