mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Correct memory leak found with Valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20718 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6b0d693f1e
commit
9f6080b566
@ -140,15 +140,18 @@ GncGUID
|
|||||||
gnc_scm2guid(SCM guid_scm)
|
gnc_scm2guid(SCM guid_scm)
|
||||||
{
|
{
|
||||||
GncGUID guid;
|
GncGUID guid;
|
||||||
const gchar * str;
|
gchar * str;
|
||||||
|
|
||||||
if (!scm_is_string(guid_scm)
|
if (!scm_is_string(guid_scm)
|
||||||
|| (GUID_ENCODING_LENGTH != scm_c_string_length (guid_scm)))
|
|| (GUID_ENCODING_LENGTH != scm_c_string_length (guid_scm)))
|
||||||
{
|
{
|
||||||
return *guid_null();
|
return *guid_null();
|
||||||
}
|
}
|
||||||
|
scm_dynwind_begin (0);
|
||||||
str = scm_to_locale_string (guid_scm);
|
str = scm_to_locale_string (guid_scm);
|
||||||
string_to_guid(str, &guid);
|
string_to_guid(str, &guid);
|
||||||
|
scm_dynwind_free (str);
|
||||||
|
scm_dynwind_end ();
|
||||||
return guid;
|
return guid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user