Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -2220,12 +2220,14 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
ZEND_HASH_FOREACH_VAL(ph, current) {
ZVAL_DEREF(current);
val = zval_get_tmp_string(current, &tmp_val);
slist = curl_slist_append(slist, ZSTR_VAL(val));
struct curl_slist *new_slist = curl_slist_append(slist, ZSTR_VAL(val));
zend_tmp_string_release(tmp_val);
if (!slist) {
if (!new_slist) {
curl_slist_free_all(slist);
php_error_docref(NULL, E_WARNING, "Could not build curl_slist");
return FAILURE;
}
slist = new_slist;
} ZEND_HASH_FOREACH_END();

if (slist) {
Expand Down
Loading