r17228 - gnucash/trunk/lib/libqof/qof - Fix memory leak in qof_session_save() - "msg" is never freed.
Phil Longstaff
plongstaff at cvs.gnucash.org
Thu Jun 12 20:21:35 EDT 2008
Author: plongstaff
Date: 2008-06-12 20:21:35 -0400 (Thu, 12 Jun 2008)
New Revision: 17228
Trac: http://svn.gnucash.org/trac/changeset/17228
Modified:
gnucash/trunk/lib/libqof/qof/qofsession.c
Log:
Fix memory leak in qof_session_save() - "msg" is never freed.
Modified: gnucash/trunk/lib/libqof/qof/qofsession.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/qofsession.c 2008-06-13 00:18:48 UTC (rev 17227)
+++ gnucash/trunk/lib/libqof/qof/qofsession.c 2008-06-13 00:21:35 UTC (rev 17228)
@@ -1287,6 +1287,7 @@
{
PWARN("%s", msg);
g_free(msg);
+ msg = NULL;
}
}
/* Tell the books about the backend that they'll be using. */
@@ -1347,6 +1348,7 @@
}
LEAVE("error -- No backend!");
leave:
+ if(msg != NULL) g_free(msg);
g_atomic_int_inc(&session->lock);
return;
}
More information about the gnucash-changes
mailing list