shared: Don't leak file descriptor in shared/image-loader.c

dev
Martin Olsson 13 years ago committed by Kristian Høgsberg
parent 444799adbb
commit 712f5f405e
  1. 4
      shared/image-loader.c

@ -359,8 +359,10 @@ load_image(const char *filename)
if (fp == NULL)
return NULL;
if (fread(header, sizeof header, 1, fp) != 1)
if (fread(header, sizeof header, 1, fp) != 1) {
fclose(fp);
return NULL;
}
rewind(fp);
for (i = 0; i < ARRAY_LENGTH(loaders); i++) {

Loading…
Cancel
Save