Skip to content

Commit

Permalink
Correct memory leak found with Valgrind.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20687 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
J. Alex Aycinena committed May 23, 2011
1 parent 28b598f commit 186a7e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/engine/engine-helpers.c
Expand Up @@ -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);

Expand Down

0 comments on commit 186a7e6

Please sign in to comment.