[Rpm-maint] [PATCH 2/3] rpmio: Don't de-ref lzfile which was freed in lzclose()

Mukund Sivaraman muks at banu.com
Thu Sep 29 07:09:13 UTC 2011


---
 rpmio/rpmio.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
index 683d221..2434687 100644
--- a/rpmio/rpmio.c
+++ b/rpmio/rpmio.c
@@ -1176,7 +1176,9 @@ static int lzdClose(FD_t fd)
 
     if (fd) {
 	if (rc == -1) {
-	    fd->errcookie = strerror(ferror(lzfile->file));
+	    fd->errcookie = "lzclose error";
+	    fd->syserrno = errno;
+	    fd->errcookie = strerror(fd->syserrno);
 	}
     }
 
-- 
1.7.4.4



More information about the Rpm-maint mailing list