CURL usage in ACB
-
Hello!
I was looking at some of the curl code in pfsense and found a common curl coding sequence, especially in services_acb.php and acb.inc, where :
$curl_session = curl_init(); // curl_setopt calls $data = curl_exec($curl_session); if (curl_errno($curl_session)) { // curl error handling code... } else { curl_close($curl_session); // curl success code... }
curl_close is only called if there is no curl_errno.
The PHP docs indicate that curl_close should be called regardless.
John
-