mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Plug more memory leaks
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20003 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -216,7 +216,10 @@ environment_override()
|
||||
g_free (config_path);
|
||||
g_free (env_file);
|
||||
if ( !got_keyfile )
|
||||
{
|
||||
g_key_file_free(keyfile);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Read the environment overrides and apply them */
|
||||
env_vars = g_key_file_get_keys(keyfile, "Variables", ¶m_count, &error);
|
||||
@@ -242,6 +245,7 @@ environment_override()
|
||||
gchar *expanded = environment_expand (val_list[j]);
|
||||
new_val = g_build_path (G_SEARCHPATH_SEPARATOR_S, tmp_val, expanded, NULL);
|
||||
g_free (tmp_val);
|
||||
g_free(expanded);
|
||||
tmp_val = new_val;
|
||||
}
|
||||
g_strfreev (val_list);
|
||||
@@ -254,11 +258,12 @@ environment_override()
|
||||
if (!g_setenv (env_vars[i], new_val, TRUE))
|
||||
g_warning ("Couldn't properly override environment variable \"%s\". "
|
||||
"This may lead to unexpected results", env_vars[i]);
|
||||
g_free(new_val);
|
||||
}
|
||||
}
|
||||
|
||||
g_strfreev(env_vars);
|
||||
|
||||
g_key_file_free(keyfile);
|
||||
}
|
||||
|
||||
#ifdef MAC_INTEGRATION
|
||||
|
||||
Reference in New Issue
Block a user