diff options
author | James Booth <boothj5@gmail.com> | 2016-07-29 00:10:34 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-07-29 00:10:34 +0100 |
commit | a02be1f1b61b3262f8c58467838045a208e5ca90 (patch) | |
tree | 0758e985a2f0837487a8c8dabf9261c988841f99 | |
parent | c8f53a64fe6f840226919460d7cdc36fd4b55d9e (diff) | |
parent | 3396e75d23cc634304b632464958eb1d1e1c2490 (diff) | |
download | profani-tty-a02be1f1b61b3262f8c58467838045a208e5ca90.tar.gz |
Merge remote-tracking branch 'origin/master'
-rw-r--r-- | src/xmpp/session.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xmpp/session.c b/src/xmpp/session.c index 139d2fdb..95930802 100644 --- a/src/xmpp/session.c +++ b/src/xmpp/session.c @@ -397,7 +397,11 @@ session_check_autoaway(void) if (saved_status) { free(saved_status); } - saved_status = curr_status; + if (curr_status) { + saved_status = strdup(curr_status); + } else { + saved_status = NULL; + } // send away presence with last activity char *message = prefs_get_string(PREF_AUTOAWAY_MESSAGE); @@ -481,6 +485,7 @@ session_check_autoaway(void) break; } + free(curr_status); prefs_free_string(mode); } |