[PATCH 2/2] perf header: Fix possible memory leaks in process_group_desc()

2013-11-17 Thread Namhyung Kim
From: Namhyung Kim After processing all group descriptors or encountering an error, it frees all descriptors. However, current logic can leak memory since it might not traverse all descriptors. Note that the 'i' can have different value than nr_groups when an error occurred and it's safe to

[PATCH 2/2] perf header: Fix possible memory leaks in process_group_desc()

2013-11-17 Thread Namhyung Kim
From: Namhyung Kim namhyung@lge.com After processing all group descriptors or encountering an error, it frees all descriptors. However, current logic can leak memory since it might not traverse all descriptors. Note that the 'i' can have different value than nr_groups when an error occurred