]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
libsmooth: findkey: Empty target string if key could not be found.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 25 Nov 2012 23:01:28 +0000 (00:01 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 25 Nov 2012 23:01:28 +0000 (00:01 +0100)
src/install+setup/libsmooth/varval.c

index 9a64365af7a823f36aa060c8e3f91cb8098fbcb5..d12789097d04aac8cace0801fbcc368d0cbc15ef 100644 (file)
@@ -151,6 +151,9 @@ int findkey(struct keyvalue *head, char *key, char *value)
                cur = cur->next;
        }
 
                cur = cur->next;
        }
 
+       // Empty value if we could not find key.
+       value[0] = '\0';
+
        return 0;
 }
 
        return 0;
 }