im.pidgin.pidgin: f0ca42a609119f1883679cac103ac30114a5ea15

sadrul at pidgin.im sadrul at pidgin.im
Wed Nov 21 17:35:48 EST 2007


-----------------------------------------------------------------
Revision: f0ca42a609119f1883679cac103ac30114a5ea15
Ancestor: 083c26115e5eecc25e831eca67354ce797334b51
Author: sadrul at pidgin.im
Date: 2007-11-21T22:31:11
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/irc/cmds.c

ChangeLog: 

Plug a tiny little leak.

-------------- next part --------------
============================================================
--- libpurple/protocols/irc/cmds.c	51720e8c029487ad091394ec7146be0adcadc1cd
+++ libpurple/protocols/irc/cmds.c	0ff95f4f0f9dd85e95a3dad11e566bf266b047e7
@@ -294,14 +294,17 @@ int irc_cmd_op(struct irc_conn *irc, con
 	ops = g_new0(char *, i * 2 + 1);
 
 	for (i = 0; nicks[i]; i++) {
-		if (!*nicks[i])
+		if (!*nicks[i]) {
+			g_free(nicks[i]);
 			continue;
+		}
 		ops[used++] = mode;
 		ops[used++] = nicks[i];
 	}
 
 	irc_do_mode(irc, target, sign, ops);
 	g_free(ops);
+	g_free(nicks);  /* No, not g_strfreev */
 
 	return 0;
 }


More information about the Commits mailing list