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:
parent
ef18734f20
commit
8e3d039199
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue