Edit report at https://bugs.php.net/bug.php?id=65458&edit=1
ID: 65458
User updated by: peter57 at post dot sk
Reported by: peter57 at post dot sk
Summary: curl memory leak
Status: Open
Type: Bug
Package: cURL related
-Operating System: Linux/Windows
+Operating System: Linux
-PHP Version: 5.4.18
+PHP Version: 5.5.2
Block user comment: N
Private report: N
New Comment:
Bug present in PHP 5.5.2
Previous Comments:
------------------------------------------------------------------------
[2013-08-16 06:56:37] peter57 at post dot sk
Description:
------------
When CURLOPT_HTTPHEADER is called more than once on the same curl handle,
php/curl does not free the memory of the previous header data.
Similar to bug 63859.
Test script:
---------------
<?php
$ch = curl_init();
echo memory_get_usage(), "\n";
for ($i = 0; $i < 10000; $i++)
{
curl_setopt($ch, CURLOPT_HTTPHEADER, [ "SOAPAction: getItems" ]);
}
echo memory_get_usage(), "\n";
curl_close($ch);
echo memory_get_usage(), "\n";
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65458&edit=1