From 3fc6c32bede01e02b2ac4541c952f37dbad511b3 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 16 Oct 2010 15:58:21 -0700 Subject: Stop calling nogaim_init() on every incoming connection (unless we're using libpurple). This was leaking memory and indirectly caused the bug fixed by the previous revision. --- irc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'irc.c') diff --git a/irc.c b/irc.c index 579fb8cf..3044c593 100644 --- a/irc.c +++ b/irc.c @@ -164,7 +164,11 @@ irc_t *irc_new( int fd ) g_free( myhost ); g_free( host ); + /* libpurple doesn't like fork()s after initializing itself, so this + is the right moment to initialize it. */ +#ifdef WITH_PURPLE nogaim_init(); +#endif for( l = irc_plugins; l; l = l->next ) { -- cgit v1.2.3