diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-19 21:18:52 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-03-19 21:18:52 +0100 |
commit | cfeabcaf0e69b02bac6c86edc223d2eb2e2367d3 (patch) | |
tree | 1a723497e9d3cfa75f7be25a248fac63fc73a423 /tunnel.c | |
parent | f4c907480f85faa88dbf19270bb8f02d7b15d6f1 (diff) |
fix a memory leak
Diffstat (limited to 'tunnel.c')
-rw-r--r-- | tunnel.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -6,7 +6,6 @@ struct tunnel { struct device dev; device_state_cb set_state; - struct blob_attr *config; }; static int @@ -16,7 +15,7 @@ tunnel_set_state(struct device *dev, bool up) int ret; if (up) { - ret = system_add_ip_tunnel(dev->ifname, tun->config); + ret = system_add_ip_tunnel(dev->ifname, dev->config); if (ret != 0) return ret; } @@ -36,7 +35,6 @@ tunnel_create(const char *name, struct blob_attr *attr) tun = calloc(1, sizeof(*tun)); dev = &tun->dev; - tun->config = config_memdup(attr); device_init(dev, &tunnel_device_type, name); tun->set_state = dev->set_state; dev->set_state = tunnel_set_state; |