From: Sterling Hughes Date: Sat, 28 Apr 2001 21:37:45 +0000 (+0000) Subject: fix bug #10541 X-Git-Tag: php-4.0.6RC1~276 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d53ab0ae48f444c6f4bafc7d8a585531bf7b9004;p=php fix bug #10541 --- diff --git a/ext/curl/curl.c b/ext/curl/curl.c index cfcdec13e3..6fac748527 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -599,14 +599,15 @@ PHP_FUNCTION(curl_exec) if (ret != CURLE_OK) { SAVE_CURL_ERROR(curl_handle, ret); - RETURN_FALSE; + RETVAL_FALSE; } else { - RETURN_TRUE; + RETVAL_TRUE; } if (fp && is_temp_file) fclose(fp); + return; } fseek(fp, 0, SEEK_SET); @@ -626,6 +627,9 @@ PHP_FUNCTION(curl_exec) struct stat stat_sb; if (fstat(fileno(fp), &stat_sb)) { + if (is_temp_file) { + fclose(fp); + } RETURN_FALSE; }