diff options
author | Vinson Lee <[email protected]> | 2010-02-17 01:57:14 -0800 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2010-02-17 01:57:14 -0800 |
commit | 7eaf33ad0349e39dd6611b0b27aa44687e8c3014 (patch) | |
tree | 2a6033b33086f45713f18809043fc0c57ddfc824 /progs/redbook/minmax.c | |
parent | 41b19c279a0eae61f0f95c3b66376a25635241fd (diff) |
progs/redbook: Fix memory leaks on error paths.
Diffstat (limited to 'progs/redbook/minmax.c')
-rw-r--r-- | progs/redbook/minmax.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/progs/redbook/minmax.c b/progs/redbook/minmax.c index da5b875a475..8281800ba43 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; } |