diff options
Diffstat (limited to 'src/nm-config.c')
-rw-r--r-- | src/nm-config.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nm-config.c b/src/nm-config.c index 03fca56b73..d28ed86fbb 100644 --- a/src/nm-config.c +++ b/src/nm-config.c @@ -471,8 +471,8 @@ read_config (GKeyFile *keyfile, const char *path, GError **error) if (keys[k][len - 1] == '+') { char *base_key = g_strndup (keys[k], len - 1); - const char *old_val = g_key_file_get_value (keyfile, groups[g], base_key, NULL); - const char *new_val = g_key_file_get_value (kf, groups[g], keys[k], NULL); + char *old_val = g_key_file_get_value (keyfile, groups[g], base_key, NULL); + char *new_val = g_key_file_get_value (kf, groups[g], keys[k], NULL); if (old_val && *old_val) { char *combined = g_strconcat (old_val, ",", new_val, NULL); @@ -483,6 +483,8 @@ read_config (GKeyFile *keyfile, const char *path, GError **error) g_key_file_set_value (keyfile, groups[g], base_key, new_val); g_free (base_key); + g_free (old_val); + g_free (new_val); continue; } |