From 8e3d0391995f9e935efb6049d8d0bcfedf184a54 Mon Sep 17 00:00:00 2001 From: RichardHitt Date: Wed, 13 Feb 2013 12:52:49 -0800 Subject: Fix bug in url.c at re_host(). Unlike the other re_foo() functions it was not checking immediately and returning if host_ret had already been filled in. This would causes a memory leak since the previous GRegex would be lost. --- src/common/url.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/url.c b/src/common/url.c index dad23b67..6bd7d9ff 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -371,6 +371,9 @@ re_host (void) { static GRegex *host_ret; char *grist; + + if (host_ret) return host_ret; + grist = g_strdup_printf ( "(" /* HOST */ HOST OPT_PORT -- cgit 1.4.1