[PATCH] perf tools: Free strlist in strlist__delete()
From: Namhyung Kim
Date: Fri Sep 06 2013 - 01:35:41 EST
From: Namhyung Kim <namhyung.kim@xxxxxxx>
It seems strlist never deleted after allocated. AFAICS every strlist
is allocated dynamically, just free it in the _delete() function.
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/strlist.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/strlist.c b/tools/perf/util/strlist.c
index eabdce0a2daa..11593d899eb2 100644
--- a/tools/perf/util/strlist.c
+++ b/tools/perf/util/strlist.c
@@ -155,8 +155,10 @@ out_error:
void strlist__delete(struct strlist *slist)
{
- if (slist != NULL)
+ if (slist != NULL) {
rblist__delete(&slist->rblist);
+ free(slist);
+ }
}
struct str_node *strlist__entry(const struct strlist *slist, unsigned int idx)
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/