lkml.org 
[lkml]   [2011]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/8] perf tools: Fix a memory leak on perf_read_values_destroy
    Date
    After freeing each elements of the @values->value, we should free
    itself too.

    Signed-off-by: Namhyung Kim <namhyung@gmail.com>
    ---
    tools/perf/util/values.c | 1 +
    1 files changed, 1 insertions(+), 0 deletions(-)

    diff --git a/tools/perf/util/values.c b/tools/perf/util/values.c
    index bdd33470b235..697c8b4e59cc 100644
    --- a/tools/perf/util/values.c
    +++ b/tools/perf/util/values.c
    @@ -32,6 +32,7 @@ void perf_read_values_destroy(struct perf_read_values *values)

    for (i = 0; i < values->threads; i++)
    free(values->value[i]);
    + free(values->value);
    free(values->pid);
    free(values->tid);
    free(values->counterrawid);
    --
    1.7.6


    \
     
     \ /
      Last update: 2011-12-12 16:19    [W:0.021 / U:0.128 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site