vici: Lease enumerator is always defined
authorTobias Brunner <tobias@strongswan.org>
Fri, 7 Sep 2018 09:12:24 +0000 (11:12 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 11 Sep 2018 16:18:50 +0000 (18:18 +0200)
mem_pool_t always returns an enumerator.

src/libcharon/plugins/vici/vici_attribute.c

index 4d17425..f7c7ce1 100644 (file)
@@ -705,7 +705,7 @@ CALLBACK(get_pools, vici_message_t*,
                        i = 0;
                        builder->begin_section(builder, "leases");
                        leases = vips->create_lease_enumerator(vips);
-                       while (leases && leases->enumerate(leases, &uid, &lease, &on))
+                       while (leases->enumerate(leases, &uid, &lease, &on))
                        {
                                snprintf(buf, sizeof(buf), "%d", i++);
                                builder->begin_section(builder, buf);