degesch: fix memory leak
This commit is contained in:
parent
2bde385dc7
commit
27cd8b3a63
|
@ -5486,7 +5486,7 @@ irc_handle_privmsg_text (struct server *s,
|
||||||
}
|
}
|
||||||
|
|
||||||
char *nickname = irc_cut_nickname (msg->prefix);
|
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);
|
(s, str_map_find (&s->irc_users, nickname), target);
|
||||||
|
|
||||||
// IRCv3.2 echo-message could otherwise cause us to highlight ourselves
|
// 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);
|
"#a<#S#S>#r #m", ATTR_HIGHLIGHT, prefixes, nickname, text->str);
|
||||||
|
|
||||||
free (nickname);
|
free (nickname);
|
||||||
|
free (prefixes);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -6516,12 +6517,13 @@ static void
|
||||||
log_autosplit_privmsg (struct server *s,
|
log_autosplit_privmsg (struct server *s,
|
||||||
struct send_autosplit_args *a, struct buffer *buffer, const char *line)
|
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))
|
if (buffer && soft_assert (s->irc_user))
|
||||||
log_outcoming_privmsg (s, buffer,
|
log_outcoming_privmsg (s, buffer,
|
||||||
prefixes, s->irc_user->nickname, line);
|
prefixes, s->irc_user->nickname, line);
|
||||||
else
|
else
|
||||||
log_outcoming_orphan_privmsg (s, a->target, line);
|
log_outcoming_orphan_privmsg (s, a->target, line);
|
||||||
|
free (prefixes);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SEND_AUTOSPLIT_PRIVMSG(s, target, message) \
|
#define SEND_AUTOSPLIT_PRIVMSG(s, target, message) \
|
||||||
|
|
Loading…
Reference in New Issue