On 10/16/2011 08:15 AM, Thomas Jarosch wrote:
> Detected by cppcheck.

Applied, thanks!

https://github.com/autotest/autotest/commit/49ae92eb471297751c0197e7def0bbff76ecb997

> Signed-off-by: Thomas Jarosch<[email protected]>
> ---
>   client/profilers/powertop/src/powertop.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/client/profilers/powertop/src/powertop.c 
> b/client/profilers/powertop/src/powertop.c
> index 20d10ff..9fcfe10 100644
> --- a/client/profilers/powertop/src/powertop.c
> +++ b/client/profilers/powertop/src/powertop.c
> @@ -342,8 +342,10 @@ static void read_data_cpuidle(uint64_t * usage, uint64_t 
> * duration)
>                             entry->d_name);
>
>               dir = opendir(filename);
> -             if (!dir)
> +             if (!dir) {
> +                     closedir(cpudir);
>                       return;
> +             }
>
>               clevel = 0;
>

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to