diff options
author | Valentin Batz <senneth@irssi.org> | 2004-12-07 17:48:21 +0000 |
---|---|---|
committer | vb <vb@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-12-07 17:48:21 +0000 |
commit | 5f81451df63acf5a809b5a551bc1b1e3e63ccfa0 (patch) | |
tree | 18c5fa47947b7ef5a693f9ea175d211eeb2c0945 /src | |
parent | 2ffae72fc0a74df1c25acbc81fe0640bdcfdbef3 (diff) | |
download | irssi-5f81451df63acf5a809b5a551bc1b1e3e63ccfa0.zip |
Fixed a memleak, when using recode_out you have too free the memory it allocates for you.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3691 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/proxy/dump.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/irc/proxy/dump.c b/src/irc/proxy/dump.c index 2777e971..a07c724a 100644 --- a/src/irc/proxy/dump.c +++ b/src/irc/proxy/dump.c @@ -155,6 +155,7 @@ static void dump_join(IRC_CHANNEL_REC *channel, CLIENT_REC *client) GSList *tmp, *nicks; GString *str; int first; + char *recoded; proxy_outserver(client, "JOIN %s", channel->name); @@ -196,11 +197,13 @@ static void dump_join(IRC_CHANNEL_REC *channel, CLIENT_REC *client) proxy_outdata(client, ":%s 366 %s %s :End of /NAMES list.\n", client->proxy_address, client->nick, channel->name); - /* this is needed because the topic may be encoded into other charsets internaly */ if (channel->topic != NULL) { + /* this is needed because the topic may be encoded into other charsets internaly */ + recoded = recode_out(channel->topic, channel->name); proxy_outdata(client, ":%s 332 %s %s :%s\n", client->proxy_address, client->nick, - channel->name, recode_out(channel->topic, channel->name)); + channel->name, recoded); + g_free(recoded); if (channel->topic_time > 0) proxy_outdata(client, ":%s 333 %s %s %s %d\n", client->proxy_address, client->nick, |