swconfig: swlib.c: free name and description of attributes
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 7 Jul 2015 13:46:16 +0000 (13:46 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Tue, 7 Jul 2015 13:46:16 +0000 (13:46 +0000)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46232 3c298f89-4303-0410-b956-a3cf2f4a3e73

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