diff -ur gimageview-0.1.8-bak/src/tga.c gimageview-0.1.8/src/tga.c --- gimageview-0.1.8-bak/src/tga.c Sat Feb 9 01:44:32 2002 +++ gimageview-0.1.8/src/tga.c Sat Feb 16 16:23:25 2002 @@ -105,6 +105,7 @@ #ifdef GIMV_DEBUG g_message (_("TGA: Cannot read footer from \"%s\"\n"), filename); #endif + fclose (fp); return NULL; } else if (memcmp (footer + 8, magic, sizeof (magic)) == 0) { @@ -117,6 +118,7 @@ #ifdef GIMV_DEBUG g_message (_("TGA: Cannot read extension from \"%s\"\n"), filename); #endif + fclose (fp); return NULL; } @@ -130,6 +132,7 @@ #ifdef GIMV_DEBUG g_message ("TGA: Cannot read header from \"%s\"\n", filename); #endif + fclose (fp); return NULL; } @@ -188,6 +191,7 @@ #ifdef GIMV_DEBUG g_message ("TGA: Unhandled sub-format in \"%s\"\n", filename); #endif + fclose (fp); return NULL; } break; @@ -205,6 +209,7 @@ #ifdef GIMV_DEBUG g_message ("TGA: Unhandled sub-format in \"%s\"\n", filename); #endif + fclose (fp); return NULL; } break; @@ -220,6 +225,7 @@ #ifdef GIMV_DEBUG g_message ("TGA: Unhandled sub-format in \"%s\"\n", filename); #endif + fclose (fp); return NULL; } break; @@ -228,6 +234,7 @@ #ifdef GIMV_DEBUG g_message ("TGA: Unknown image type for \"%s\"\n", filename); #endif + fclose (fp); return NULL; } @@ -236,6 +243,7 @@ #ifdef GIMV_DEBUG g_message ("TGA: No support yet for TGA with these parameters\n"); #endif + fclose (fp); return NULL; } @@ -245,12 +253,14 @@ g_message ("TGA: indexed image has invalid color map type %d\n", info.colorMapType); #endif + fclose (fp); return NULL; } else if (info.imageType != TGA_TYPE_MAPPED && info.colorMapType != 0) { #ifdef GIMV_DEBUG g_message ("TGA: non-indexed image has invalid color map type %d\n", info.colorMapType); #endif + fclose (fp); return NULL; } @@ -259,6 +269,7 @@ #ifdef GIMV_DEBUG g_message ("TGA: File is truncated or corrupted \"%s\"\n", filename); #endif + fclose (fp); return NULL; }