From 51255d8b64861ce57e40ff47f877dbe41188a1dd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 20 May 2015 14:02:02 +0200 Subject: [PATCH] ifcfg-rh: fix svSetValue() to properly handle empty variables svSetValue() called svGetValue() which would return %NULL for empty variables. That is wrong, because it caused svSetValue() to add the variable anew. --- src/settings/plugins/ifcfg-rh/shvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings/plugins/ifcfg-rh/shvar.c b/src/settings/plugins/ifcfg-rh/shvar.c index f041aa6cb..8e174bd56 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.c +++ b/src/settings/plugins/ifcfg-rh/shvar.c @@ -382,7 +382,7 @@ svSetValue (shvarFile *s, const char *key, const char *value, gboolean verbatim) newval = value; else newval = svEscape (value, &newval_free); - oldval = svGetValue (s, key, FALSE); + oldval = svGetValueFull (s, key, FALSE); if (!newval || !newval[0]) { /* delete value */