]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
sw-collector: Proper cleanup if DB query fails in check operation
authorTobias Brunner <tobias@strongswan.org>
Wed, 23 May 2018 17:08:45 +0000 (19:08 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 23 May 2018 18:25:50 +0000 (20:25 +0200)
src/sw-collector/sw-collector.c

index 2b1783eff693c037cf931ae51f0e56ba648bb3f7..f8229a19296920dc62ade548be0c2012ee842798 100644 (file)
@@ -633,6 +633,7 @@ static int check(sw_collector_db_t *db)
        e = db->create_sw_enumerator(db, SW_QUERY_ALL, NULL);
        if (!e)
        {
+               table->destroy_function(table, (void*)free_entry);
                return EXIT_FAILURE;
        }
        while (e->enumerate(e, &sw_id, &name, &package, &version, &installed))