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 d7e570e05d1d427b408834a59e4e3ccf00ffccc8..d9ef62f4ab46008d251b50a57dacddfce40f1872 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 2b42c1476088ab03148b0585352cce765e662d20..7edece3cc68966eff8f609e408eb4977e2ed6687 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;
 };