r22070 - gnucash/trunk/src - Fix memory leak: Missing regfree() after regcomp().
Christian Stimming
cstim at code.gnucash.org
Thu Mar 8 16:20:07 EST 2012
Author: cstim
Date: 2012-03-08 16:20:07 -0500 (Thu, 08 Mar 2012)
New Revision: 22070
Trac: http://svn.gnucash.org/trac/changeset/22070
Modified:
gnucash/trunk/src/backend/xml/gnc-backend-xml.c
gnucash/trunk/src/html/gnc-html.c
Log:
Fix memory leak: Missing regfree() after regcomp().
Modified: gnucash/trunk/src/backend/xml/gnc-backend-xml.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-backend-xml.c 2012-02-29 20:52:01 UTC (rev 22069)
+++ gnucash/trunk/src/backend/xml/gnc-backend-xml.c 2012-03-08 21:20:07 UTC (rev 22070)
@@ -928,6 +928,7 @@
else if (regexec(&pattern, stamp_start, 0, NULL, 0) == 0)
got_date_stamp = TRUE;
+ regfree(&pattern);
g_free(expression);
if (!got_date_stamp) /* Not a gnucash created file after all... */
Modified: gnucash/trunk/src/html/gnc-html.c
===================================================================
--- gnucash/trunk/src/html/gnc-html.c 2012-02-29 20:52:01 UTC (rev 22069)
+++ gnucash/trunk/src/html/gnc-html.c 2012-03-08 21:20:07 UTC (rev 22070)
@@ -179,6 +179,7 @@
machine = g_strndup( path + match[1].rm_so, match[1].rm_eo - match[1].rm_so );
}
}
+ regfree(&compiled_m);
return machine;
}
More information about the gnucash-changes
mailing list