aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-09-16 14:20:45 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-09-16 14:20:45 +0530
commit545583d664b64ff234b99aca0d85e99c8a55808f (patch)
treeac7990f5da235562b34b3ab278306b8d13961925 /libio
parentf0416165a5d0aba7c63d2870894b716db8f76319 (diff)
downloadglibc-545583d664b64ff234b99aca0d85e99c8a55808f.zip
glibc-545583d664b64ff234b99aca0d85e99c8a55808f.tar.gz
glibc-545583d664b64ff234b99aca0d85e99c8a55808f.tar.bz2
Fix memory leak in error path of do_ftell_wide (BZ #17370)
Diffstat (limited to 'libio')
-rw-r--r--libio/wfileops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libio/wfileops.c b/libio/wfileops.c
index ebc06e8..c5ec5f7 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);