settings: Fix purge if order differs from alphabetical order
authorTobias Brunner <tobias@strongswan.org>
Tue, 25 Oct 2016 08:46:36 +0000 (10:46 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 7 Feb 2017 10:00:31 +0000 (11:00 +0100)
src/libstrongswan/settings/settings_types.c

index 1256762..d753720 100644 (file)
@@ -177,7 +177,7 @@ static bool section_purge(section_t *this, array_t *contents)
         * having any such subsections) are not removed */
        for (i = array_count(this->sections_order) - 1; i >= 0; i--)
        {
-               array_get(this->sections, i, &current);
+               array_get(this->sections_order, i, &current);
                if (section_purge(current, contents))
                {
                        array_remove(this->sections_order, i, NULL);