Browse Source

swconfig: swlib.c: free name and description of attributes

Signed-off-by: Alexandru Ardelean <[email protected]>

SVN-Revision: 46232
John Crispin 10 years ago
parent
commit
5da98f3478

+ 2 - 0
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;
 	}

+ 2 - 2
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;
 };