strdup() iface passed to queue_route_reinstall(), fixing double-free
authorMartin Willi <martin@revosec.ch>
Mon, 11 Mar 2013 14:17:50 +0000 (15:17 +0100)
committerMartin Willi <martin@revosec.ch>
Mon, 11 Mar 2013 14:17:50 +0000 (15:17 +0100)
src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c

index b6df987..3e0725a 100644 (file)
@@ -1760,7 +1760,7 @@ METHOD(kernel_net_t, add_ip, status_t,
                                /* during IKEv1 reauthentication, children get moved from
                                 * old the new SA before the virtual IP is available. This
                                 * kills the route for our virtual IP, reinstall. */
-                               queue_route_reinstall(this, entry->iface->ifname);
+                               queue_route_reinstall(this, strdup(entry->iface->ifname));
                                return SUCCESS;
                        }
                }