]> granicus.if.org Git - php/commitdiff
Fix for bug #2199. Redirect was returning http:// which resulted in a crash.
authorAndrey Hristov <andrey@php.net>
Mon, 27 Sep 1999 15:17:28 +0000 (15:17 +0000)
committerAndrey Hristov <andrey@php.net>
Mon, 27 Sep 1999 15:17:28 +0000 (15:17 +0000)
ext/standard/url.c

index 9a6ab019a3a98a8274b6b9c1defc2c6b7242b425..4b669b5348a2c57e82540833aa19774b9f0af22f 100644 (file)
@@ -140,6 +140,14 @@ url *url_parse(char *string)
                }
                efree(result);
        }
+       else {
+               STR_FREE(ret->scheme);
+               STR_FREE(ret->path);
+               STR_FREE(ret->query);
+               STR_FREE(ret->fragment);
+               efree(ret);
+               return NULL;
+       }
        regfree(&re);
        return ret;
 }