mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/soap/php_http.c: Fix memory leak of header value
This commit is contained in:
parent
974526b244
commit
85a49d4198
2 changed files with 2 additions and 1 deletions
1
NEWS
1
NEWS
|
@ -45,6 +45,7 @@ PHP NEWS
|
|||
- SOAP:
|
||||
. Fixed bug GH-18990, bug #81029, bug #47314 (SOAP HTTP socket not closing
|
||||
on object destruction). (nielsdos)
|
||||
. Fix memory leak when URL parsing fails in redirect. (Girgias)
|
||||
|
||||
- Standard:
|
||||
. Fix misleading errors in printf(). (nielsdos)
|
||||
|
|
|
@ -1128,11 +1128,11 @@ try_again:
|
|||
|
||||
if ((loc = get_http_header_value(ZSTR_VAL(http_headers), "Location: ")) != NULL) {
|
||||
php_url *new_url = php_url_parse(loc);
|
||||
efree(loc);
|
||||
|
||||
if (new_url != NULL) {
|
||||
zend_string_release_ex(http_headers, 0);
|
||||
zend_string_release_ex(http_body, 0);
|
||||
efree(loc);
|
||||
if (new_url->scheme == NULL && new_url->path != NULL) {
|
||||
new_url->scheme = phpurl->scheme ? zend_string_copy(phpurl->scheme) : NULL;
|
||||
new_url->host = phpurl->host ? zend_string_copy(phpurl->host) : NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue