Fixed memleaks with otr policy and autoaway options

This commit is contained in:
James Booth
2014-06-17 23:34:52 +01:00
parent ad68bcfde2
commit 79ddf10484
5 changed files with 25 additions and 11 deletions

View File

@@ -254,6 +254,7 @@ handle_incoming_message(char *from, char *message, gboolean priv)
// internal OTR message
if (newmessage == NULL) {
free(policy);
return;
}
} else {
@@ -264,6 +265,7 @@ handle_incoming_message(char *from, char *message, gboolean priv)
cons_show("Attempting to start OTR session...");
message_send(otr_query_message, from);
}
free(policy);
ui_incoming_msg(from, newmessage, NULL, priv);