summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
diff options
context:
space:
mode:
authorSami Kerola2014-02-21 11:17:11 +0100
committerKarel Zak2014-02-21 13:45:32 +0100
commit5fdd35070ceb79589d52fa247d1b359bd2bdc471 (patch)
tree75bb2f72283aed5464fe269925e23c3dd5133a2d /text-utils/more.c
parentscript: clean up files usage (diff)
downloadkernel-qcow2-util-linux-5fdd35070ceb79589d52fa247d1b359bd2bdc471.tar.gz
kernel-qcow2-util-linux-5fdd35070ceb79589d52fa247d1b359bd2bdc471.tar.xz
kernel-qcow2-util-linux-5fdd35070ceb79589d52fa247d1b359bd2bdc471.zip
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 <kerolasa@iki.fi>
Diffstat (limited to 'text-utils/more.c')
-rw-r--r--text-utils/more.c1
1 files changed, 0 insertions, 1 deletions
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;
}
}