[OpenWrt-Devel] [PATCH 4/4] swconfig: swlib.c: free name and description of attributes
Alexandru Ardelean
ardeleanalex at gmail.com
Thu Jun 18 11:50:49 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 1e0a7db..dae603c 100644
--- a/package/network/config/swconfig/src/swlib.c
+++ b/package/network/config/swconfig/src/swlib.c
@@ -749,6 +749,8 @@ swlib_free_attributes(struct switch_attr **head)
while (a) {
next = a->next;
+ free(a->name);
+ free(a->description);
free(a);
a = next;
}
diff --git a/package/network/config/swconfig/src/swlib.h b/package/network/config/swconfig/src/swlib.h
index 2b42c14..7edece3 100644
--- a/package/network/config/swconfig/src/swlib.h
+++ b/package/network/config/swconfig/src/swlib.h
@@ -146,8 +146,8 @@ struct switch_attr {
int atype;
int id;
int type;
- const char *name;
- const char *description;
+ char *name;
+ char *description;
struct switch_attr *next;
};
--
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