[PATCH bitmap] Fix memory leak.
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Jan 7 15:42:52 PST 2011
On 12/23/10 09:01 AM, Trevor Woerner wrote:
> From: Trevor Woerner <twoerner at gmail.com>
>
> Signed-off-by: Trevor Woerner <twoerner at gmail.com>
> ---
> bmtoa.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/bmtoa.c b/bmtoa.c
> index bdd2078..8cd96b1 100644
> --- a/bmtoa.c
> +++ b/bmtoa.c
> @@ -208,6 +208,7 @@ print_scanline (unsigned int width,
> putchar ('\n');
> if (padded) dp++;
> }
> + free (scanline);
> return;
> }
>
Is there any reason to malloc scanline at all? It appears
entirely unused. (Looks like someone planned to put characters
into it, then print that string, but instead just calls putchar()
directly for each one.)
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Platform Engineering: X Window System
More information about the xorg-devel
mailing list