about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-01-28 21:17:00 +0000
committerJames Booth <boothj5@gmail.com>2013-01-28 21:17:00 +0000
commitcb24ba8be175e0ddde93a0e01c286ee7cab2b241 (patch)
treed4910e029098c54d84116d11357c2ea47230e9d3
parentbf1cf0444702566d5b77a4e4e195ef7c8341a185 (diff)
downloadprofani-tty-cb24ba8be175e0ddde93a0e01c286ee7cab2b241.tar.gz
jabber_get_status no longer returns newly allocated string
-rw-r--r--src/command.c2
-rw-r--r--src/xmpp_conn.c6
2 files changed, 2 insertions, 6 deletions
diff --git a/src/command.c b/src/command.c
index 04e99484..0d590b1f 100644
--- a/src/command.c
+++ b/src/command.c
@@ -2181,8 +2181,6 @@ _cmd_set_priority(gchar **args, struct cmd_help_t help)
         prefs_set_priority((int)intval);
         // update presence with new priority
         jabber_update_presence(jabber_get_presence(), status, 0);
-        if (status != NULL)
-            free(status);
         cons_show("Priority set to %d.", intval);
     }
 
diff --git a/src/xmpp_conn.c b/src/xmpp_conn.c
index 6b37fe8b..07e592e7 100644
--- a/src/xmpp_conn.c
+++ b/src/xmpp_conn.c
@@ -542,13 +542,11 @@ jabber_get_presence(void)
     return jabber_conn.presence;
 }
 
+// returns pointer to status, owned by connection
 char *
 jabber_get_status(void)
 {
-    if (jabber_conn.status == NULL)
-        return NULL;
-    else
-        return strdup(jabber_conn.status);
+    return jabber_conn.status;
 }
 
 void