1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Merge branch 'master' into plugins

This commit is contained in:
James Booth 2016-07-27 23:36:08 +01:00
commit 6e9604b0e6
2 changed files with 8 additions and 3 deletions

View File

@ -365,9 +365,9 @@ static char *
_c_plugin_name(const char *filename) _c_plugin_name(const char *filename)
{ {
GString *plugin_name_str = g_string_new(""); GString *plugin_name_str = g_string_new("");
char *name = strndup(filename, strlen(filename)-1); gchar *name = g_strndup(filename, strlen(filename)-1);
g_string_append(plugin_name_str, name); g_string_append(plugin_name_str, name);
free(name); g_free(name);
g_string_append(plugin_name_str, "so"); g_string_append(plugin_name_str, "so");
char *result = plugin_name_str->str; char *result = plugin_name_str->str;
g_string_free(plugin_name_str, FALSE); g_string_free(plugin_name_str, FALSE);

View File

@ -397,7 +397,11 @@ session_check_autoaway(void)
if (saved_status) { if (saved_status) {
free(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 // send away presence with last activity
char *message = prefs_get_string(PREF_AUTOAWAY_MESSAGE); char *message = prefs_get_string(PREF_AUTOAWAY_MESSAGE);
@ -481,6 +485,7 @@ session_check_autoaway(void)
break; break;
} }
free(curr_status);
prefs_free_string(mode); prefs_free_string(mode);
} }