about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTim Lammens <tim.lammens@gmail.com>2014-09-11 10:35:54 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-09-11 10:44:02 +0530
commit984c0ea97f649c869130a1ff099098e2b6f70aad (patch)
tree7acec9da9c0e47c83dfa316088a670974d1986f5
parent3daee1076b3703b01235949e2dcc8e29eb028aad (diff)
downloadglibc-984c0ea97f649c869130a1ff099098e2b6f70aad.tar.gz
glibc-984c0ea97f649c869130a1ff099098e2b6f70aad.tar.xz
glibc-984c0ea97f649c869130a1ff099098e2b6f70aad.zip
Fix memory leak in libio/wfileops.c do_ftell_wide [BZ #17370]
-rw-r--r--ChangeLog5
-rw-r--r--NEWS2
-rw-r--r--libio/wfileops.c1
3 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 20eb3b312e..0377062999 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-11  Tim Lammens  <tim.lammens@gmail.com>
+
+	[BZ #17370]
+	* libio/wfileops (do_ftell_wide): Free OUT.
+
 2014-09-10  Chris Metcalf  <cmetcalf@tilera.com>
 
 	* sysdeps/unix/sysv/linux/tile/lowlevellock.h: Remove file.
diff --git a/NEWS b/NEWS
index 40e2497eff..c607d12485 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.21
 
 * The following bugs are resolved with this release:
 
-  17363.
+  17363, 17370.
 
 Version 2.20
 
diff --git a/libio/wfileops.c b/libio/wfileops.c
index f123add354..ebc06e85de 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