Properly initialize linked list when enumerating interface addresses
authorTobias Brunner <tobias@strongswan.org>
Mon, 10 Dec 2012 08:46:51 +0000 (09:46 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 10 Dec 2012 08:47:46 +0000 (09:47 +0100)
src/dumm/ext/dumm.c

index 1f04767..cca9a0d 100644 (file)
@@ -631,6 +631,7 @@ static VALUE iface_each_addr(int argc, VALUE *argv, VALUE self)
        {
                rb_raise(rb_eArgError, "must be called with a block");
        }
+       list = linked_list_create();
        Data_Get_Struct(self, iface_t, iface);
        enumerator = iface->create_address_enumerator(iface);
        while (enumerator->enumerate(enumerator, &addr))