swconfig: swlib.c: free name and description of attributes
authorJohn Crispin <john@openwrt.org>
Tue, 7 Jul 2015 13:46:16 +0000 (13:46 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 7 Jul 2015 13:46:16 +0000 (13:46 +0000)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
SVN-Revision: 46232

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

index d7e570e..d9ef62f 100644 (file)
@@ -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;
        }
index 2b42c14..7edece3 100644 (file)
@@ -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;
 };