mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Fix memory leak in error path of do_ftell_wide (BZ #17370)
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2014-09-16 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
|
||||
[BZ #17370]
|
||||
* libio/wfileops.c (do_ftell_wide): Free OUT on error path.
|
||||
|
||||
2014-09-16 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||
Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
|
@@ -708,7 +708,10 @@ do_ftell_wide (_IO_FILE *fp)
|
||||
sequences must be complete since they are accepted as
|
||||
wchar_t; if not, then that is an error. */
|
||||
if (__glibc_unlikely (status != __codecvt_ok))
|
||||
{
|
||||
free (out);
|
||||
return WEOF;
|
||||
}
|
||||
|
||||
offset += outstop - out;
|
||||
free (out);
|
||||
|
Reference in New Issue
Block a user