Skip to content

Commit

Permalink
Merge branch 'PHP-5.5'
Browse files Browse the repository at this point in the history
* PHP-5.5:
  Fixed #63859 Memory leak when reusing curl-handle
  • Loading branch information
adoy committed Dec 27, 2012
2 parents c9a080d + 8b67981 commit f3ff33a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/curl/interface.c
Expand Up @@ -2600,6 +2600,9 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
return 1;
}

if (Z_REFCOUNT_P(ch->clone) <= 1) {
zend_llist_clean(&ch->to_free->post);
}
zend_llist_add_element(&ch->to_free->post, &first);
error = curl_easy_setopt(ch->cp, CURLOPT_HTTPPOST, first);

Expand Down

0 comments on commit f3ff33a

Please sign in to comment.