settings: Don't enumerate key/value pairs with NULL value
authorTobias Brunner <tobias@strongswan.org>
Mon, 10 Mar 2014 09:53:52 +0000 (10:53 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 15 May 2014 09:28:07 +0000 (11:28 +0200)
src/libstrongswan/settings/settings.c

index 25c5d6e..b36d1df 100644 (file)
@@ -817,7 +817,7 @@ static bool kv_filter(hashtable_t *seen, kv_t **in, char **key,
                                          void *none, char **value)
 {
        *key = (*in)->key;
-       if (seen->get(seen, *key))
+       if (seen->get(seen, *key) || !(*in)->value)
        {
                return FALSE;
        }