about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-07-31 23:01:15 +0100
committerJames Booth <boothj5@gmail.com>2012-07-31 23:01:15 +0100
commit0a42be57a31882d000437cc10729c360f3482ae0 (patch)
treea3335a5d722d9019addb0346e937d2b0c29d1544 /src
parentf7a542f488c27f3400bbaea909af933c6c9966cd (diff)
downloadprofani-tty-0a42be57a31882d000437cc10729c360f3482ae0.tar.gz
Cleaning up memory allocated by ncurses pads
Diffstat (limited to 'src')
-rw-r--r--src/preferences.c6
-rw-r--r--src/preferences.h1
-rw-r--r--src/profanity.c3
-rw-r--r--src/windows.c7
4 files changed, 16 insertions, 1 deletions
diff --git a/src/preferences.c b/src/preferences.c
index 6cd7ac78..bcd749ce 100644
--- a/src/preferences.c
+++ b/src/preferences.c
@@ -96,6 +96,12 @@ prefs_load(void)
     _load_colours();
 }
 
+void
+prefs_close(void)
+{
+    g_key_file_free(prefs);
+}
+
 static NCURSES_COLOR_T
 _lookup_colour(const char * const colour)
 {
diff --git a/src/preferences.h b/src/preferences.h
index dd3b7916..160d9d9d 100644
--- a/src/preferences.h
+++ b/src/preferences.h
@@ -26,6 +26,7 @@
 #include <glib.h>
 
 void prefs_load(void);
+void prefs_close(void);
 
 char * find_login(char *prefix);
 void reset_login_search(void);
diff --git a/src/profanity.c b/src/profanity.c
index 440f3b33..4a17f68c 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -79,7 +79,7 @@ profanity_init(const int disable_tls)
     jabber_init(disable_tls);
     command_init();
     contact_list_init();
-    tinyurl_init();
+//    tinyurl_init();
     atexit(_profanity_shutdown);
 }
 
@@ -90,4 +90,5 @@ _profanity_shutdown(void)
     gui_close();
     log_close();
     chat_log_close();
+    prefs_close();
 }
diff --git a/src/windows.c b/src/windows.c
index 6fc62ebe..68d4b053 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -125,6 +125,13 @@ gui_refresh(void)
 void
 gui_close(void)
 {
+    int i;
+    for (i = 0; i < NUM_WINS; i++) {
+        if (_wins[i].win != NULL) {
+            delwin(_wins[i].win);
+        }
+    }
+
     endwin();
 }