Skip to content

Commit f6380e4

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: ext/soap/php_http.c: Fix memory leak of header value
2 parents 5623e67 + de7a212 commit f6380e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/soap/php_http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,11 +1144,11 @@ int make_http_soap_request(zval *this_ptr,
11441144

11451145
if ((loc = get_http_header_value(ZSTR_VAL(http_headers), "Location:")) != NULL) {
11461146
php_url *new_url = php_url_parse(loc);
1147+
efree(loc);
11471148

11481149
if (new_url != NULL) {
11491150
zend_string_release_ex(http_headers, 0);
11501151
zend_string_release_ex(http_body, 0);
1151-
efree(loc);
11521152
if (new_url->scheme == NULL && new_url->path != NULL) {
11531153
new_url->scheme = phpurl->scheme ? zend_string_copy(phpurl->scheme) : NULL;
11541154
new_url->host = phpurl->host ? zend_string_copy(phpurl->host) : NULL;

0 commit comments

Comments
 (0)