diff options
author | Sami Kerola | 2014-02-21 11:17:11 +0100 |
---|---|---|
committer | Karel Zak | 2014-02-21 13:45:32 +0100 |
commit | 5fdd35070ceb79589d52fa247d1b359bd2bdc471 (patch) | |
tree | 75bb2f72283aed5464fe269925e23c3dd5133a2d | |
parent | script: clean up files usage (diff) | |
download | kernel-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>
-rw-r--r-- | text-utils/more.c | 1 |
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; } } |