]> granicus.if.org Git - php/commitdiff
- Fix the fix
authorFelipe Pena <felipe@php.net>
Tue, 29 Jul 2008 12:41:58 +0000 (12:41 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 29 Jul 2008 12:41:58 +0000 (12:41 +0000)
ext/standard/url.c

index e8afc226ccb399b065a8c6f7df1c811f9e6d0e4e..d84524f8808016fbd6e53b8c00a400f9c24836de 100644 (file)
@@ -420,7 +420,9 @@ PHP_FUNCTION(parse_url)
        resource = php_url_parse_ex(str.s, str_len);
        if (resource == NULL) {
                php_error_docref1(NULL TSRMLS_CC, str.s, E_WARNING, "Unable to parse URL");
-               efree(str.s);
+               if (type == IS_UNICODE) {
+                       efree(str.s);
+               }
                RETURN_FALSE;
        }