[2957] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[PATCH] Use owl_function_command_norv when we don't care about the result

daemon@ATHENA.MIT.EDU (David Benjamin)
Tue Mar 8 15:19:38 2011

From: David Benjamin <davidben@MIT.EDU>
To: barnowl-dev@mit.edu
Date: Tue,  8 Mar 2011 15:19:24 -0500

Otherwise, we forget to g_free it.
---
 commands.c  |    2 +-
 functions.c |    4 ++--
 owl.c       |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/commands.c b/commands.c
index 32ac215..8e914bb 100644
--- a/commands.c
+++ b/commands.c
@@ -1214,7 +1214,7 @@ char *owl_command_startup(int argc, const char *const *argv, const char *buff)
 
   ptr = skiptokens(buff, 1);
 
-  owl_function_command(ptr);
+  owl_function_command_norv(ptr);
   owl_function_addstartup(ptr);
 
   return(NULL);
diff --git a/functions.c b/functions.c
index c831176..bd91c2a 100644
--- a/functions.c
+++ b/functions.c
@@ -2681,7 +2681,7 @@ void owl_function_smartzpunt(int type)
     } else {
       g_string_append(buf, " *");
     }
-    owl_function_command(buf->str);
+    owl_function_command_norv(buf->str);
     g_string_free(buf, true);
   }
 }
@@ -3306,7 +3306,7 @@ void owl_function_source(const char *filename)
   while (owl_getline_chomp(&s, file)) {
     if (s[0] == '\0' || s[0] == '#')
       continue;
-    owl_function_command(s);
+    owl_function_command_norv(s);
   }
 
   g_free(s);
diff --git a/owl.c b/owl.c
index ba5acf4..9a6c985 100644
--- a/owl.c
+++ b/owl.c
@@ -225,7 +225,7 @@ int owl_process_message(owl_message *m) {
     /* if it matches the alert filter, do the alert action */
     f=owl_global_get_filter(&g, owl_global_get_alert_filter(&g));
     if (f && owl_filter_message_match(f, m)) {
-      owl_function_command(owl_global_get_alert_action(&g));
+      owl_function_command_norv(owl_global_get_alert_action(&g));
     }
 
     /* if it's a zephyr login or logout, update the zbuddylist */
-- 
1.7.3.3.399.g06ddf


home help back first fref pref prev next nref lref last post