* [PATCH] more: fix double free crash
@ 2014-02-21 10:17 Sami Kerola
2014-02-21 12:46 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Sami Kerola @ 2014-02-21 10:17 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
Commit b9579f1f44b46c9f12f1e01b01c02d82ae1cf728 moved fclose() to
checkf(), but missed removing file closure in magic(). Ironically the
cause of regression is in previous commit message.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
text-utils/more.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/text-utils/more.c b/text-utils/more.c
index 4c39887..8fe4142 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -640,7 +640,6 @@ static int magic(FILE *f, char *fs)
case 0x457f: /* simple ELF detection */
printf(_("\n******** %s: Not a text file ********\n\n"),
fs);
- fclose(f);
return 1;
}
}
--
1.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] more: fix double free crash
2014-02-21 10:17 [PATCH] more: fix double free crash Sami Kerola
@ 2014-02-21 12:46 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2014-02-21 12:46 UTC (permalink / raw)
To: Sami Kerola; +Cc: util-linux
On Fri, Feb 21, 2014 at 10:17:11AM +0000, Sami Kerola wrote:
> text-utils/more.c | 1 -
> 1 file changed, 1 deletion(-)
Applied, thanks!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-21 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 10:17 [PATCH] more: fix double free crash Sami Kerola
2014-02-21 12:46 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox