summaryrefslogtreecommitdiff
path: root/progs/redbook/minmax.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/redbook/minmax.c')
-rw-r--r--progs/redbook/minmax.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/progs/redbook/minmax.c b/progs/redbook/minmax.c
index da5b875a47..8281800ba4 100644
--- a/progs/redbook/minmax.c
+++ b/progs/redbook/minmax.c
@@ -97,6 +97,7 @@ readImage( const char* filename, GLsizei* width, GLsizei *height )
pixels = (GLubyte *) malloc( n * sizeof( GLubyte ));
if ( !pixels ) {
fprintf( stderr, "Unable to malloc() bytes for pixels\n" );
+ fclose( infile );
return NULL;
}