fix a double free / use after free
authorFelix Fietkau <nbd@openwrt.org>
Wed, 5 Oct 2011 23:54:16 +0000 (01:54 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 5 Oct 2011 23:54:16 +0000 (01:54 +0200)
device.c

index f856f229294d5aea871e2ec9e605eef23c236b7c..ccf66d7b17288178c112ad2f87454c1da1e076a7 100644 (file)
--- a/device.c
+++ b/device.c
@@ -435,7 +435,6 @@ device_create(const char *name, const struct device_type *type,
                                device_set_present(odev, false);
                                device_set_present(odev, true);
                        }
-                       free(config);
                        return odev;
                case DEV_CONFIG_NO_CHANGE:
                        D(DEVICE, "Device '%s': no configuration change\n", odev->ifname);