1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00: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)
{
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);
free(name);
g_free(name);
g_string_append(plugin_name_str, "so");
char *result = plugin_name_str->str;
g_string_free(plugin_name_str, FALSE);

View File

@ -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);
}