Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [PATCH 1/4] opal-ps: fix memory leak
From: Bert Wesarg (bert.wesarg_at_[hidden])
Date: 2009-03-03 02:26:24


2009/2/19 Bert Wesarg <bert.wesarg_at_[hidden]>:
> From: Bert Wesarg <Bert.Wesarg_at_[hidden]>
>
> Free the memory alocated by the call to asprintf.
>
> Regards,
> Bert Wesarg
>
> ---
>
>  orte/tools/orte-ps/orte-ps.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --quilt old/orte/tools/orte-ps/orte-ps.c new/orte/tools/orte-ps/orte-ps.c
> --- old/orte/tools/orte-ps/orte-ps.c
> +++ new/orte/tools/orte-ps/orte-ps.c
> @@ -396,6 +396,7 @@ static int pretty_print(orte_ps_mpirun_i
>     len_hdr = strlen(header);
>
>     printf("%s\n", header);
> +    free(header);
>     for (i=0; i < len_hdr; i++) {
>         printf("%c", '-');
>     }
>

Ping.