mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-25 18:30:23 -06:00
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
This commit is contained in:
parent
23c6465903
commit
3370604c8d
@ -1287,6 +1287,7 @@ qof_session_save (QofSession *session,
|
|||||||
{
|
{
|
||||||
PWARN("%s", msg);
|
PWARN("%s", msg);
|
||||||
g_free(msg);
|
g_free(msg);
|
||||||
|
msg = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Tell the books about the backend that they'll be using. */
|
/* 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("error -- No backend!");
|
||||||
leave:
|
leave:
|
||||||
|
if(msg != NULL) g_free(msg);
|
||||||
g_atomic_int_inc(&session->lock);
|
g_atomic_int_inc(&session->lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user