[syslinux:elflink] vesa: Fix double close() bug in vesacon_load_background()

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Nov 27 14:15:03 PST 2012


Commit-ID:  c6ce504b8b79729a4e0acc2bebc5e497e4098e60
Gitweb:     http://www.syslinux.org/commit/c6ce504b8b79729a4e0acc2bebc5e497e4098e60
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Thu, 15 Nov 2012 21:27:59 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Thu, 15 Nov 2012 21:27:59 +0000

vesa: Fix double close() bug in vesacon_load_background()

We always call fclose() on 'fp' if fopen() was successful, so delete
the extraneous fclose() call in read_jpeg_file().

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/lib/sys/vesa/background.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/com32/lib/sys/vesa/background.c b/com32/lib/sys/vesa/background.c
index 9357746..15e9089 100644
--- a/com32/lib/sys/vesa/background.c
+++ b/com32/lib/sys/vesa/background.c
@@ -205,7 +205,6 @@ static int read_jpeg_file(FILE * fp, uint8_t * header, int len)
     unsigned int bytes_per_row[1];
 
     rv = floadfile(fp, &jpeg_file, &length_of_file, header, len);
-    fclose(fp);
     if (rv)
 	goto err;
 


More information about the Syslinux-commits mailing list