vesa: Fix double close() bug in vesacon_load_background()
authorMatt Fleming <matt.fleming@intel.com>
Thu, 15 Nov 2012 21:27:59 +0000 (21:27 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Thu, 15 Nov 2012 21:27:59 +0000 (21:27 +0000)
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@intel.com>
com32/lib/sys/vesa/background.c

index 9357746..15e9089 100644 (file)
@@ -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;