From b0d7b73f547a3824c32370b7ba620d8050292aa3 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 7 Jul 2015 13:45:44 +0000 Subject: swconfig: swlib.c: free device name and alias Signed-off-by: Alexandru Ardelean git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46229 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/network/config/swconfig/src/swlib.c | 2 ++ package/network/config/swconfig/src/swlib.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'package') diff --git a/package/network/config/swconfig/src/swlib.c b/package/network/config/swconfig/src/swlib.c index 122250256d..334d148c36 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 016f74b4fd..bb2ebd87d6 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; -- cgit v1.2.3