From 3370604c8dca584b1453843dbf404635cb720429 Mon Sep 17 00:00:00 2001 From: Phil Longstaff Date: Fri, 13 Jun 2008 00:21:35 +0000 Subject: [PATCH] Fix memory leak in qof_session_save() - "msg" is never freed. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17228 57a11ea4-9604-0410-9ed3-97b8803252fd --- lib/libqof/qof/qofsession.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libqof/qof/qofsession.c b/lib/libqof/qof/qofsession.c index ed0e3c3f68..f19af9240a 100644 --- a/lib/libqof/qof/qofsession.c +++ b/lib/libqof/qof/qofsession.c @@ -1287,6 +1287,7 @@ qof_session_save (QofSession *session, { PWARN("%s", msg); g_free(msg); + msg = NULL; } } /* Tell the books about the backend that they'll be using. */ @@ -1347,6 +1348,7 @@ qof_session_save (QofSession *session, } LEAVE("error -- No backend!"); leave: + if(msg != NULL) g_free(msg); g_atomic_int_inc(&session->lock); return; }