Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 004fd25eb1d89e31fc9cddb571328f7f > files > 5

glibc-2.20-21.mga5.src.rpm

From d2c37d028d48337d00200248340de0e4a893456b Mon Sep 17 00:00:00 2001
From: Tim Lammens <tim.lammens@gmail.com>
Date: Thu, 11 Sep 2014 10:35:54 +0530
Subject: [PATCH 05/18] Fix memory leak in libio/wfileops.c do_ftell_wide [BZ
 #17370]

(cherry picked from commit 984c0ea97f649c869130a1ff099098e2b6f70aad)

Conflicts:
	NEWS
---
 ChangeLog        | 5 +++++
 NEWS             | 2 +-
 libio/wfileops.c | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index f456c1a..9ebf81e 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-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
 	    Jakub Jelinek  <jakub@redhat.com>
 
diff --git a/NEWS b/NEWS
index a9991cc..c555f75 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.20.1
 
 * The following bugs are resolved with this release:
 
-  17266, 17371.
+  17266, 17370, 17371.
 
 Version 2.20
 
diff --git a/libio/wfileops.c b/libio/wfileops.c
index f123add..ebc06e8 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
-- 
2.3.0