php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13225 Memmory leak in curl
Submitted: 2001-09-10 04:46 UTC Modified: 2001-10-22 14:54 UTC
From: wico at cnh dot nl Assigned:
Status: Not a bug Package: cURL related
PHP Version: 4.0.6 OS: linux
Private report: No CVE-ID: None
 [2001-09-10 04:46 UTC] wico at cnh dot nl
Hiya

If you run this script you will only see your mem usage (slowly) grow; it looks like curl_close won't free the memmory as it won't make a diff if you use it or not :)

Greetz,

Wico

<?
	ob_implicit_flush(TRUE);

	for ($x = 0; $x < 100000; ++$x) {
		$handler = curl_init();
		curl_setopt($handler, CURLOPT_URL, 'http://www.php.net/manual/en/pcre.pattern.syntax.php');
		curl_setopt($handler, CURLOPT_RETURNTRANSFER, 1);
		$data = curl_exec($handler);
		curl_close($handler);
		unset($handler, $data);
	}
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-22 14:54 UTC] sterling@php.net
not a php bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC