Fix some small problems (including a memory leak) found by running qof unit test with valgrind.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22193 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Phil Longstaff 2012-05-21 18:35:59 +00:00
parent 140799c028
commit 0809170098
2 changed files with 2 additions and 0 deletions

View File

@ -1479,6 +1479,7 @@ gnc_dmy2timespec (int day, int month, int year)
GDate gnc_dmy2gdate (gint day, gint month, gint year)
{
GDate result;
g_date_clear(&result, 1);
g_date_set_day (&result, day);
g_date_set_month (&result, month);
g_date_set_year (&result, year);

View File

@ -1066,6 +1066,7 @@ qof_session_load_backend(QofSession * session, const char * access_method)
}
msg = g_strdup_printf("failed to load '%s' using access_method", access_method);
qof_session_push_error (session, ERR_BACKEND_NO_HANDLER, msg);
g_free(msg);
LEAVE (" ");
}