Skip to content

Commit 11ea995

Browse files
committed
curl: Remove incorrect string release on error
The string is owned by the caller, and the caller releases it. Closes GH-18989.
1 parent fa960f7 commit 11ea995

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ PHP NEWS
1313
- Curl:
1414
. Fix memory leaks when returning refcounted value from curl callback.
1515
(nielsdos)
16+
. Remove incorrect string release. (nielsdos)
1617

1718
- LDAP:
1819
. Fixed GH-18902 ldap_exop/ldap_exop_sync assert triggered on empty

ext/curl/interface.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,6 @@ static inline CURLcode add_simple_field(struct HttpPost **first, struct HttpPost
13691369
part = curl_mime_addpart(mime);
13701370
if (part == NULL) {
13711371
zend_tmp_string_release(tmp_postval);
1372-
zend_string_release_ex(string_key, 0);
13731372
return CURLE_OUT_OF_MEMORY;
13741373
}
13751374
if ((form_error = curl_mime_name(part, ZSTR_VAL(string_key))) != CURLE_OK

0 commit comments

Comments
 (0)