]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Fixed potential memory leak when processing routes from the kernel.
authorTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2011 13:14:55 +0000 (15:14 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 14 Apr 2011 16:11:45 +0000 (18:11 +0200)
src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c

index a3f5dfd9372b213b6ce0d85fff63c3f06249b323..6d0a567809410383c0a57840737231fca90a083d 100644 (file)
@@ -534,6 +534,7 @@ static void process_route(private_kernel_netlink_net_t *this, struct nlmsghdr *h
                switch (rta->rta_type)
                {
                        case RTA_PREFSRC:
+                               DESTROY_IF(host);
                                host = host_create_from_chunk(msg->rtm_family,
                                                        chunk_create(RTA_DATA(rta), RTA_PAYLOAD(rta)), 0);
                                break;