php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65458 curl memory leak
Submitted: 2013-08-16 06:56 UTC Modified: 2013-08-19 19:21 UTC
From: peter57 at post dot sk Assigned: aharvey (profile)
Status: Closed Package: cURL related
PHP Version: 5.5.2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: peter57 at post dot sk
New email:
PHP Version: OS:

 

 [2013-08-16 06:56 UTC] 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";



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-08-17 15:43 UTC] peter57 at post dot sk
-Operating System: Linux/Windows +Operating System: Linux -PHP Version: 5.4.18 +PHP Version: 5.5.2
 [2013-08-17 15:43 UTC] peter57 at post dot sk
Bug present in PHP 5.5.2
 [2013-08-19 19:20 UTC] aharvey@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: aharvey
 [2013-08-19 19:20 UTC] aharvey@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2013-08-19 19:21 UTC] aharvey@php.net
https://github.com/php/php-src/commit/aa7d3d8e6d8de73ebe8dd015fb5392a4bde5bfc6 is 
the fix — the bug tracker's auto-closing functionality seems to hate me at 
present!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC