Fix memory leak

This commit is contained in:
ecx86 2018-05-29 20:33:41 -04:00
parent cd6039a33b
commit 4a0a59dd87
2 changed files with 5 additions and 4 deletions

View File

@ -429,4 +429,5 @@ void discord_ws_set_status(discord_data *dd, gchar *status, gchar *message)
discord_ws_send_payload(dd, buf->str, buf->len);
g_string_free(buf, TRUE);
g_free(msg);
g_free(stat);
}

View File

@ -286,10 +286,10 @@ static GList *discord_away_states(struct im_connection *ic)
{
static GList *m = NULL;
m = g_list_append(m, "online");
m = g_list_append(m, "idle");
m = g_list_append(m, "dnd");
m = g_list_append(m, "invisible");
m = g_list_prepend(m, "invisible");
m = g_list_prepend(m, "dnd");
m = g_list_prepend(m, "idle");
m = g_list_prepend(m, "online");
return m;
}