diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-09-16 14:20:45 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2014-09-16 14:20:45 +0530 |
commit | 545583d664b64ff234b99aca0d85e99c8a55808f (patch) | |
tree | ac7990f5da235562b34b3ab278306b8d13961925 /libio | |
parent | Add NEWS entry for previous commit (diff) | |
download | glibc-545583d664b64ff234b99aca0d85e99c8a55808f.tar.gz glibc-545583d664b64ff234b99aca0d85e99c8a55808f.tar.bz2 glibc-545583d664b64ff234b99aca0d85e99c8a55808f.zip |
Fix memory leak in error path of do_ftell_wide (BZ #17370)
Diffstat (limited to 'libio')
-rw-r--r-- | libio/wfileops.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libio/wfileops.c b/libio/wfileops.c index ebc06e85de..c5ec5f7a27 100644 --- a/libio/wfileops.c +++ b/libio/wfileops.c @@ -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)) - return WEOF; + { + free (out); + return WEOF; + } offset += outstop - out; free (out); |