1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-29 19:56:07 -04:00

Copy curr_status and free original in session.c

This commit is contained in:
James Booth 2016-07-27 22:07:11 +01:00
parent 6c1fef522a
commit a1f48f8457

View File

@ -397,7 +397,7 @@ session_check_autoaway(void)
if (saved_status) { if (saved_status) {
free(saved_status); free(saved_status);
} }
saved_status = curr_status; saved_status = strdup(curr_status);
// send away presence with last activity // send away presence with last activity
char *message = prefs_get_string(PREF_AUTOAWAY_MESSAGE); char *message = prefs_get_string(PREF_AUTOAWAY_MESSAGE);
@ -481,6 +481,7 @@ session_check_autoaway(void)
break; break;
} }
free(curr_status);
prefs_free_string(mode); prefs_free_string(mode);
} }