about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-03-07 18:42:02 +0000
committerJames Booth <boothj5@gmail.com>2016-03-07 18:42:02 +0000
commite4071015ea256e172fa9a581cdfa15bd501bd805 (patch)
tree610b856745b21fac6b039f0d72f133c9c838e066
parent35e456aebd8469860f3d45860bfdcd6f819f582e (diff)
parent4094b75ccc19780e2e013ba897a09645a5ee4978 (diff)
downloadprofani-tty-e4071015ea256e172fa9a581cdfa15bd501bd805.tar.gz
Merge branch 'master' into plugins-python
-rw-r--r--prof.supp4
-rw-r--r--src/plugins/autocompleters.c4
-rw-r--r--src/ui/window.c29
-rw-r--r--src/window_list.c1
4 files changed, 28 insertions, 10 deletions
diff --git a/prof.supp b/prof.supp
index e456551b..4f182054 100644
--- a/prof.supp
+++ b/prof.supp
@@ -12,9 +12,7 @@
   otrl_init
   Memcheck:Leak
   ...
-  fun:_otr_init
-  fun:_init
-  fun:prof_run
+  fun:otrl_init
   ...
 }
 
diff --git a/src/plugins/autocompleters.c b/src/plugins/autocompleters.c
index 631987b1..483af7ca 100644
--- a/src/plugins/autocompleters.c
+++ b/src/plugins/autocompleters.c
@@ -67,10 +67,12 @@ autocompleters_complete(const char * const input)
     while (curr) {
         result = autocomplete_param_with_ac(input, curr->data, g_hash_table_lookup(autocompleters, curr->data), TRUE);
         if (result) {
+            g_list_free(keys);
             return result;
         }
         curr = g_list_next(curr);
     }
+    g_list_free(keys);
 
     return NULL;
 }
@@ -84,6 +86,8 @@ autocompleters_reset(void)
         autocomplete_reset(curr->data);
         curr = g_list_next(curr);
     }
+
+    g_list_free(acs);
 }
 
 void autocompleters_destroy(void)
diff --git a/src/ui/window.c b/src/ui/window.c
index 05eaf586..f52ebc41 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -419,27 +419,42 @@ win_free(ProfWin* window)
     }
     free(window->layout);
 
-    if (window->type == WIN_CHAT) {
+    switch (window->type) {
+    case WIN_CHAT:
+    {
         ProfChatWin *chatwin = (ProfChatWin*)window;
         free(chatwin->barejid);
         free(chatwin->resource_override);
         chat_state_free(chatwin->state);
+        break;
     }
-
-    if (window->type == WIN_MUC) {
+    case WIN_MUC:
+    {
         ProfMucWin *mucwin = (ProfMucWin*)window;
         free(mucwin->roomjid);
+        break;
     }
-
-    if (window->type == WIN_MUC_CONFIG) {
+    case WIN_MUC_CONFIG:
+    {
         ProfMucConfWin *mucconf = (ProfMucConfWin*)window;
         free(mucconf->roomjid);
         form_destroy(mucconf->form);
+        break;
     }
-
-    if (window->type == WIN_PRIVATE) {
+    case WIN_PRIVATE:
+    {
         ProfPrivateWin *privatewin = (ProfPrivateWin*)window;
         free(privatewin->fulljid);
+        break;
+    }
+    case WIN_PLUGIN:
+    {
+        ProfPluginWin *pluginwin = (ProfPluginWin*)window;
+        free(pluginwin->tag);
+        break;
+    }
+    default:
+        break;
     }
 
     free(window);
diff --git a/src/window_list.c b/src/window_list.c
index 5fab7ba0..9e4ede98 100644
--- a/src/window_list.c
+++ b/src/window_list.c
@@ -212,6 +212,7 @@ wins_get_plugin(const char *const tag)
         if (window->type == WIN_PLUGIN) {
             ProfPluginWin *pluginwin = (ProfPluginWin*)window;
             if (g_strcmp0(pluginwin->tag, tag) == 0) {
+                g_list_free(values);
                 return pluginwin;
             }
         }