cvs: php-src(PHP_5_0) /main network.c
| From: | Antony Dovgal | Date: | Mon, 20 Jun 2005 23:16:55 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /main network.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-32437@lists.php.net to get a copy of this message | ||
tony2001 Mon Jun 20 19:16:55 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/main network.c
Log:
MFH: fix memleak
http://cvs.php.net/diff.php/php-src/main/network.c?r1=1.109.2.3&r2=1.109.2.4&ty=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.109.2.3 php-src/main/network.c:1.109.2.4
--- php-src/main/network.c:1.109.2.3 Fri Mar 11 03:11:28 2005
+++ php-src/main/network.c Mon Jun 20 19:16:54 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: network.c,v 1.109.2.3 2005/03/11 08:11:28 hyanantha Exp $ */
+/* $Id: network.c,v 1.109.2.4 2005/06/20 23:16:54 tony2001 Exp $ */
/*#define DEBUG_MAIN_NETWORK 1*/
@@ -783,8 +783,13 @@
}
if (sa) {
+ /* free error string recieved during previous iteration (if any) */
+ if (error_string && *error_string) {
+ efree(*error_string);
+ *error_string = NULL;
+ }
+
/* make a connection attempt */
-
n = php_network_connect_socket(sock, sa, socklen, asynchronous,
timeout ? &working_timeout : NULL,
error_string, error_code);