org.guifications.plugins: b68d98afb2c565ccfe16c02aecd2961c2515d1b3

nosnilmot at guifications.org nosnilmot at guifications.org
Wed Mar 12 20:40:10 CDT 2008


-----------------------------------------------------------------
Revision: b68d98afb2c565ccfe16c02aecd2961c2515d1b3
Ancestor: de1c64fd71e3b7332bcab70bb7b5299db54e010e
Author: nosnilmot at guifications.org
Date: 2008-03-13T01:17:12
Branch: org.guifications.plugins

Modified files:
        irssi/textfmt.c

ChangeLog: 

Leak fixes

-----------------------------------------------------------------
This revision's diffstat output:
 textfmt.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
-------------- next part --------------
============================================================
--- irssi/textfmt.c	24b6147b7fa9e5c42b322977fe12f1a6dfabd86f
+++ irssi/textfmt.c	70d6b3788fb6bf8fbdeea8d18204b426784e869e
@@ -104,8 +104,10 @@ irssi_textfmt_regex_helper(gchar *messag
 	/* now let's replce the matches.
 	 * If we don't have any, drop out right away.
 	 */
-	if(regexec(&regex, iter, GROUP_TOTAL, matches, 0) != 0)
+	if(regexec(&regex, iter, GROUP_TOTAL, matches, 0) != 0) {
+		regfree(&regex);
 		return message;
+	}
 
 	/* create our GString.  Heh heh */
 	str = g_string_new("");
@@ -145,6 +147,8 @@ irssi_textfmt_regex_helper(gchar *messag
 		iter += matches[GROUP_ALL].rm_eo;
 	} while(regexec(&regex, iter, GROUP_TOTAL, matches, REG_NOTBOL) == 0);
 
+	regfree(&regex);
+
 	/* at this point, iter is either the remains of the text, of a single null
 	 * terminator.  So throw it onto the GString.
 	 */


More information about the Plugins-commits mailing list