From 5fdd35070ceb79589d52fa247d1b359bd2bdc471 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Fri, 21 Feb 2014 10:17:11 +0000 Subject: more: fix double free crash 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 --- text-utils/more.c | 1 - 1 file changed, 1 deletion(-) (limited to 'text-utils/more.c') diff --git a/text-utils/more.c b/text-utils/more.c index b06abbb63..d05e9467c 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -639,7 +639,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; } } -- cgit v1.2.3-55-g7522