Correct memory leak found with Valgrind.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20687 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
J. Alex Aycinena 2011-05-23 22:26:34 +00:00
parent 28b598fc4f
commit 186a7e621c

View File

@ -502,12 +502,17 @@ gnc_query_scm2path (SCM path_scm)
while (!scm_is_null (path_scm))
{
SCM key_scm = SCM_CAR (path_scm);
char *str;
char *key;
if (!scm_is_string (key_scm))
break;
key = g_strdup (scm_to_locale_string (key_scm));
scm_dynwind_begin (0);
str = scm_to_locale_string(key_scm);
key = g_strdup (str);
scm_dynwind_free (str);
scm_dynwind_end ();
path = g_slist_prepend (path, key);