From f447ac418983b94a71afecbd1d9057344adddee1 Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 6 Feb 2015 21:39:53 +0000 Subject: [PATCH 1/4] Free win layout --- src/ui/window.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ui/window.c b/src/ui/window.c index dfec5aab..54f1b99f 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -330,6 +330,7 @@ win_free(ProfWin* window) buffer_free(window->layout->buffer); delwin(window->layout->win); } + free(window->layout); if (window->type == WIN_CHAT) { ProfChatWin *chatwin = (ProfChatWin*)window; From 8977c9c721f0d8cf6f25f908f93ec6f6f8196bac Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 6 Feb 2015 21:40:35 +0000 Subject: [PATCH 2/4] Removed duplicate time_ac --- src/command/command.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/command/command.c b/src/command/command.c index 7be6603d..9698f0bd 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1466,10 +1466,6 @@ cmd_init(void) autocomplete_add(time_ac, "seconds"); autocomplete_add(time_ac, "off"); - time_ac = autocomplete_new(); - autocomplete_add(time_ac, "minutes"); - autocomplete_add(time_ac, "seconds"); - resource_ac = autocomplete_new(); autocomplete_add(resource_ac, "set"); autocomplete_add(resource_ac, "off"); From 1e35b76bf9767667c0a2dafb7d016a34ae6cac33 Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 6 Feb 2015 21:41:24 +0000 Subject: [PATCH 3/4] Added callgrind.out files to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index be11f141..09d5c04d 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ profanity.workspace m4/ test.sh clean-test.sh +callgrind.out.* From bec95afc8b4ba3d86b0a74d68285042c7c40948e Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 6 Feb 2015 22:03:40 +0000 Subject: [PATCH 4/4] Removed strdup passed to autocompleter --- src/contact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contact.c b/src/contact.c index f16f1679..943be374 100644 --- a/src/contact.c +++ b/src/contact.c @@ -381,7 +381,7 @@ void p_contact_set_presence(const PContact contact, Resource *resource) { g_hash_table_replace(contact->available_resources, strdup(resource->name), resource); - autocomplete_add(contact->resource_ac, strdup(resource->name)); + autocomplete_add(contact->resource_ac, resource->name); } void