degesch: fix memory leak

This commit is contained in:
Přemysl Eric Janouch 2015-07-27 00:08:28 +02:00
parent 2bde385dc7
commit 27cd8b3a63
1 changed files with 4 additions and 2 deletions

View File

@ -5486,7 +5486,7 @@ irc_handle_privmsg_text (struct server *s,
}
char *nickname = irc_cut_nickname (msg->prefix);
const char *prefixes = irc_get_privmsg_prefix
char *prefixes = irc_get_privmsg_prefix
(s, str_map_find (&s->irc_users, nickname), target);
// IRCv3.2 echo-message could otherwise cause us to highlight ourselves
@ -5505,6 +5505,7 @@ irc_handle_privmsg_text (struct server *s,
"#a<#S#S>#r #m", ATTR_HIGHLIGHT, prefixes, nickname, text->str);
free (nickname);
free (prefixes);
}
static void
@ -6516,12 +6517,13 @@ static void
log_autosplit_privmsg (struct server *s,
struct send_autosplit_args *a, struct buffer *buffer, const char *line)
{
const char *prefixes = irc_get_privmsg_prefix (s, s->irc_user, a->target);
char *prefixes = irc_get_privmsg_prefix (s, s->irc_user, a->target);
if (buffer && soft_assert (s->irc_user))
log_outcoming_privmsg (s, buffer,
prefixes, s->irc_user->nickname, line);
else
log_outcoming_orphan_privmsg (s, a->target, line);
free (prefixes);
}
#define SEND_AUTOSPLIT_PRIVMSG(s, target, message) \