From 31f2ffeffd5ff735329821113c4d4d4d54f4f8dd Mon Sep 17 00:00:00 2001 From: Vinicius Gomes Date: Fri, 11 Apr 2008 23:04:17 +0000 Subject: network: fixes a memory leak when reading the Disable config option. --- network/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'network') diff --git a/network/main.c b/network/main.c index e749762e..66266b90 100644 --- a/network/main.c +++ b/network/main.c @@ -57,7 +57,7 @@ static void read_config(const char *file) { GKeyFile *keyfile; GError *err = NULL; - const char *disabled; + char *disabled; keyfile = g_key_file_new(); @@ -79,6 +79,7 @@ static void read_config(const char *file) if (strstr(disabled, "Server")) conf.server_enabled = FALSE; } + g_free(disabled); conf.security = !g_key_file_get_boolean(keyfile, "General", "DisableSecurity", &err); -- cgit