Skip to content

Commit ca16a22

Browse files
committed
ext/soap/php_http.c: Fix memory leak of header value
1 parent 1e4db48 commit ca16a22

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
@@ -1160,11 +1160,11 @@ bool make_http_soap_request(
11601160

11611161
if ((loc = get_http_header_value(http_headers, "Location:")) != NULL) {
11621162
php_url *new_url = php_url_parse(loc);
1163+
efree(loc);
11631164

11641165
if (new_url != NULL) {
11651166
zend_string_release_ex(http_headers, 0);
11661167
zend_string_release_ex(http_body, 0);
1167-
efree(loc);
11681168
if (new_url->scheme == NULL && new_url->path != NULL) {
11691169
new_url->scheme = phpurl->scheme ? zend_string_copy(phpurl->scheme) : NULL;
11701170
new_url->host = phpurl->host ? zend_string_copy(phpurl->host) : NULL;

0 commit comments

Comments
 (0)