cvs: /php4/ext/standard url.c
| From: | Thies C. Arntzen | Date: | Wed, 16 Feb 2000 11:42:19 +0000 |
| Subject: | cvs: /php4/ext/standard url.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10333@lists.php.net to get a copy of this message | ||
thies Wed Feb 16 03:42:19 2000 EDT
Modified files:
/php4/ext/standard url.c
Log:
(url_parse) fix memory leak (#3495)
Index: php4/ext/standard/url.c
diff -u php4/ext/standard/url.c:1.20 php4/ext/standard/url.c:1.21
--- php4/ext/standard/url.c:1.20 Thu Feb 10 11:41:19 2000
+++ php4/ext/standard/url.c Wed Feb 16 03:41:49 2000
@@ -15,7 +15,7 @@
| Author: Jim Winstead (jimw@php.net) |
+----------------------------------------------------------------------+
*/
-/* $Id: url.c,v 1.20 2000/02/10 19:41:19 zeev Exp $ */
+/* $Id: url.c,v 1.21 2000/02/16 11:41:49 thies Exp $ */
#include <stdlib.h>
#include <string.h>
@@ -83,6 +83,7 @@
if (err) {
/*php_error(E_WARNING,"Error with regex\n");*/
efree(ret);
+ regfree(&re);
return NULL;
}
/* no processing necessary on the scheme */
@@ -122,6 +123,7 @@
efree(ret);
efree(result);
/*php_error(E_WARNING,"Unable to compile regex: %d\n", err);*/
+ regfree(&re);
return NULL;
}
/* now deal with all of the results */
@@ -145,6 +147,7 @@
STR_FREE(ret->query);
STR_FREE(ret->fragment);
efree(ret);
+ regfree(&re);
return NULL;
}
regfree(&re);