From 453fcae2838f0e260eba4d0e69991e3f48b31abf Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 31 Jul 2012 23:20:11 +0100 Subject: [PATCH] Fixed definite memory leaks --- src/main.c | 2 ++ src/preferences.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/main.c b/src/main.c index c4175160..5e1ef9c5 100644 --- a/src/main.c +++ b/src/main.c @@ -52,6 +52,8 @@ main(int argc, char **argv) return 1; } + g_option_context_free(context); + if (version == TRUE) { g_print("Profanity, version %s\n", PACKAGE_VERSION); g_print("Copyright (C) 2012 James Booth <%s>.\n", PACKAGE_BUGREPORT); diff --git a/src/preferences.c b/src/preferences.c index bcd749ce..833425d8 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -93,6 +93,12 @@ prefs_load(void) p_autocomplete_add(ac, jids[i]); } + for (i = 0; i < njids; i++) { + free(jids[i]); + } + free(jids); + + _load_colours(); }