X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=vlandev.c;h=884e6efefaf439397843902cb2b855576da70835;hp=7b2038e93019b5f89207591c64c88b3721fffbc5;hb=b0720e584f750073a4bc81c889abdaf08983e0ce;hpb=5a4eb870afc69e9fa93fdccb8a42f75e8e357f4e diff --git a/vlandev.c b/vlandev.c index 7b2038e..884e6ef 100644 --- a/vlandev.c +++ b/vlandev.c @@ -131,6 +131,7 @@ vlandev_free(struct device *dev) mvdev = container_of(dev, struct vlandev_device, dev); device_remove_user(&mvdev->parent); + free(mvdev->config_data); free(mvdev); } @@ -185,6 +186,7 @@ vlandev_reload(struct device *dev, struct blob_attr *attr) struct vlandev_device *mvdev; mvdev = container_of(dev, struct vlandev_device, dev); + attr = blob_memdup(attr); blobmsg_parse(device_attr_list.params, __DEV_ATTR_MAX, tb_dev, blob_data(attr), blob_len(attr)); @@ -214,6 +216,7 @@ vlandev_reload(struct device *dev, struct blob_attr *attr) vlandev_config_init(dev); } + free(mvdev->config_data); mvdev->config_data = attr; return ret; }