On Wed, 12 Jun 2013 09:55:43 -0400
Hal Rosenstock <[email protected]> wrote:

> From: Dan Ben Yosef <[email protected]>

Thanks applied!
Ira

> 
> Memory leak.
> 
> Signed-off-by: Dan Ben Yosef <[email protected]>
> Signed-off-by: Hal Rosenstock <[email protected]>
> ---
>  src/ibsysstat.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/src/ibsysstat.c b/src/ibsysstat.c
> index eb876d4..c1438c1 100644
> --- a/src/ibsysstat.c
> +++ b/src/ibsysstat.c
> @@ -271,8 +271,10 @@ int build_cpuinfo(void)
>       while (fgets(line, sizeof(line) - 1, f)) {
>               if (!strncmp(line, "processor\t", 10)) {
>                       ncpu++;
> -                     if (ncpu > MAX_CPUS)
> +                     if (ncpu > MAX_CPUS) {
> +                             fclose(f);
>                               return MAX_CPUS;
> +                     }
>                       continue;
>               }
>  
> -- 
> 1.7.8.2
> 


-- 
Ira Weiny <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to