perf: Fix memory leak: counterwidth
Alexander Beregalov [Thu, 7 Jan 2010 16:40:47 +0000 (19:40 +0300)]
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <1262882447-23776-2-git-send-email-a.beregalov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

tools/perf/util/values.c

index 1c15e39..cfa55d6 100644 (file)
@@ -169,6 +169,7 @@ static void perf_read_values__display_pretty(FILE *fp,
                                counterwidth[j], values->value[i][j]);
                fprintf(fp, "\n");
        }
+       free(counterwidth);
 }
 
 static void perf_read_values__display_raw(FILE *fp,