ACK: [PATCH] cpu: cpufreq: fix leak of dir before we return
Alex Hung
alex.hung at canonical.com
Tue May 7 03:03:18 UTC 2013
On 05/07/2013 05:33 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Coverity CID #997352, Resource leak.
>
> Need to closedir before we return.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/cpu/cpufreq/cpufreq.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/cpu/cpufreq/cpufreq.c b/src/cpu/cpufreq/cpufreq.c
> index 5133f51..df52100 100644
> --- a/src/cpu/cpufreq/cpufreq.c
> +++ b/src/cpu/cpufreq/cpufreq.c
> @@ -495,6 +495,7 @@ static void do_sw_any_test(fwts_framework *fw)
> if (get_performance_repeat(fw, first_cpu_index, 5, GET_PERFORMANCE_MIN, &lowperf) != FWTS_OK) {
> fwts_failed(fw, LOG_LEVEL_MEDIUM, "CPUFreqSW_ANYGetPerf",
> "Failed to get CPU performance.");
> + closedir(dir);
> return;
> }
> lowperf = (100 * lowperf) / top_speed;
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list