[OpenWrt-Devel] [PATCH 1/4] swconfig: swlib.c: free device name and alias
Alexandru Ardelean
ardeleanalex at gmail.com
Thu Jun 18 11:50:46 EDT 2015
From: Alexandru Ardelean <aa at ocedo.com>
Signed-off-by: Alexandru Ardelean <ardeleanalex at gmail.com>
---
package/network/config/swconfig/src/swlib.c | 2 ++
package/network/config/swconfig/src/swlib.h | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/package/network/config/swconfig/src/swlib.c b/package/network/config/swconfig/src/swlib.c
index 1222502..334d148 100644
--- a/package/network/config/swconfig/src/swlib.c
+++ b/package/network/config/swconfig/src/swlib.c
@@ -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)
diff --git a/package/network/config/swconfig/src/swlib.h b/package/network/config/swconfig/src/swlib.h
index 016f74b..bb2ebd8 100644
--- a/package/network/config/swconfig/src/swlib.h
+++ b/package/network/config/swconfig/src/swlib.h
@@ -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;
--
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list