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.
This commit is contained in:
RichardHitt 2013-02-13 12:52:49 -08:00
parent ef18734f20
commit 8e3d039199
1 changed files with 3 additions and 0 deletions

View File

@ -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