aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/irc_im.c b/irc_im.c
index 0b02ff89..d71c9ee9 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -234,7 +234,7 @@ static gboolean bee_irc_user_msg(bee_t *bee, bee_user_t *bu, const char *msg_, t
msg = s;
} else {
/* Modules can swallow messages. */
- return TRUE;
+ goto cleanup;
}
}
}
@@ -249,8 +249,9 @@ static gboolean bee_irc_user_msg(bee_t *bee, bee_user_t *bu, const char *msg_, t
wrapped = word_wrap(msg, 425);
irc_send_msg(iu, "PRIVMSG", dst, wrapped, prefix);
-
g_free(wrapped);
+
+cleanup:
g_free(prefix);
g_free(msg);
g_free(ts);
@@ -291,6 +292,8 @@ static gboolean bee_irc_user_action_response(bee_t *bee, bee_user_t *bu, const c
irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL);
+ g_string_free(msg, TRUE);
+
return TRUE;
}