[PATCH] memory leak in libio/wfileops.c do_ftell_wide [BZ #17370]

Siddhesh Poyarekar siddhesh@redhat.com
Wed Sep 10 23:05:00 GMT 2014


On Wed, Sep 10, 2014 at 10:21:23PM +0200, Tim Lammens wrote:
> Hi,
> 
> Here is a patch to fix the memory leak in libio/wfileops.c.

Thanks, I'll push this fix.  Your submission is lacking a ChangeLog,
but I'll write it up for you.  If you're looking to contribute more
regularly, you might want to review the contribution checklist[1].

Siddhesh

[1] https://sourceware.org/glibc/wiki/Contribution%20checklist

> 
> Regards,
> Tim
> 
> 
> diff --git a/libio/wfileops.c b/libio/wfileops.c
> index f123add..4b8fda9 100644
> --- a/libio/wfileops.c
> +++ b/libio/wfileops.c
> @@ -711,6 +711,7 @@ do_ftell_wide (_IO_FILE *fp)
>                 return WEOF;
> 
>               offset += outstop - out;
> +             free(out);
>             }
> 
>           /* We don't trust _IO_read_end to represent the current file offset
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140910/68f387e8/attachment.sig>


More information about the Libc-alpha mailing list