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

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>

SVN-Revision: 46232
This commit is contained in:
John Crispin 2015-07-07 13:46:16 +00:00
parent 294907aa3a
commit 5da98f3478
2 changed files with 4 additions and 2 deletions

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

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