fix leaks

This commit is contained in:
mfranz
2009-05-16 16:17:39 +02:00
committed by Tim Moore
parent 26b4776394
commit 1ccaf3a0bd
3 changed files with 8 additions and 5 deletions
+1
View File
@@ -55,6 +55,7 @@ bool sg_glWritePPMFile(const char *filename, GLubyte *buffer, int win_width, int
ibuffer = (unsigned char *) malloc(win_width*win_height*RGB3);
if ( (fp = fopen(filename, "wb")) == NULL ) {
free(ibuffer);
printf("Warning: cannot open %s\n", filename);
return false;
}