swconfig: swlib.c: free device name and alias
authorJohn Crispin <john@openwrt.org>
Tue, 7 Jul 2015 13:45:44 +0000 (13:45 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 7 Jul 2015 13:45:44 +0000 (13:45 +0000)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
SVN-Revision: 46229

package/network/config/swconfig/src/swlib.c
package/network/config/swconfig/src/swlib.h

index 122250256d7497af9dd4418e270ea43b9591a9cb..334d148c3694259efa1403d9872ba103dd29ca8c 100644 (file)
@@ -761,6 +761,8 @@ swlib_free(struct switch_dev *dev)
        swlib_free_attributes(&dev->ops);
        swlib_free_attributes(&dev->port_ops);
        swlib_free_attributes(&dev->vlan_ops);
+       free(dev->name);
+       free(dev->alias);
        free(dev);
 
        if (--refcount == 0)
index 016f74b4fd1c8d9194ff2e4904a3c3dd4cc4ec33..bb2ebd87d63d2099b0e9dd04ded4fb1f0cdbf506 100644 (file)
@@ -116,8 +116,8 @@ struct uci_package;
 struct switch_dev {
        int id;
        char dev_name[IFNAMSIZ];
-       const char *name;
-       const char *alias;
+       char *name;
+       char *alias;
        int ports;
        int vlans;
        int cpu_port;