diff options
author | Alessandro Bono <alessandro.bono369@gmail.com> | 2022-11-08 14:55:07 +0100 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2023-04-28 19:41:28 +0000 |
commit | d5b17abe3382a4efdd0703618b03303cb587fed2 (patch) | |
tree | 6d2fcf3cc932b377a05581528ac5485acd2e1db7 /common | |
parent | 89148f111d0ae91b5ba23776a6c57e917e5a13dc (diff) | |
download | gdm-d5b17abe3382a4efdd0703618b03303cb587fed2.tar.gz |
gdm-common: Let GPtrArray deal with its content
Diffstat (limited to 'common')
-rw-r--r-- | common/gdm-common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/common/gdm-common.c b/common/gdm-common.c index 3e31f426..741c4a8c 100644 --- a/common/gdm-common.c +++ b/common/gdm-common.c @@ -578,7 +578,7 @@ gdm_get_script_environment (const char *username, GHashTable *hash; struct passwd *pwent; - env = g_ptr_array_new (); + env = g_ptr_array_new_with_free_func (g_free); /* create a hash table of current environment, then update keys has necessary */ hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); @@ -724,7 +724,6 @@ gdm_run_script (const char *dir, &status, &error); - g_ptr_array_foreach (env, (GFunc)g_free, NULL); g_ptr_array_free (env, TRUE); g_strfreev (argv); |