No need to leak memory

This commit is contained in:
Alcaro 2018-07-11 17:10:07 +02:00 committed by GitHub
parent 3a46647a63
commit 22f072f8f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -696,8 +696,8 @@ static gboolean discord_prepare_message(struct im_connection *ic,
posted = discord_post_message(cinfo, cinfo->to.handle.name, fmsg, is_self, tstamp);
} else if (cinfo->type == CHANNEL_TEXT || cinfo->type == CHANNEL_GROUP_PRIVATE) {
posted = discord_post_message(cinfo, author, fmsg, is_self, tstamp);
g_free(fmsg);
}
g_free(fmsg);
json_value *attachments = json_o_get(minfo, "attachments");
if (attachments != NULL && attachments->type == json_array) {