summaryrefslogtreecommitdiffstats
path: root/progs/samples
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-12-07 17:16:10 -0800
committerIan Romanick <[email protected]>2009-12-07 17:16:10 -0800
commit8fc433fa0f8c5364454858f9be919387feda440c (patch)
treeec4fd82af464123acbef1f16212aa44e8f9fddd1 /progs/samples
parentbb64c9bcdf9962c4f74d71f49307de1da4c3392b (diff)
parent9dbd47fc6b1cf9ddfb318f2e05df0886cd5fe0df (diff)
Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Conflicts: progs/demos/projtex.c progs/xdemos/glxinfo.c src/mesa/main/version.h To fix the confilicts in projtex.c and glxinfo.c I just took the code from mesa_7_6_branch. The conflicts seem to have occured from cherry-picks from mesa_7_7_branch to mesa_7_6_branch followed by commmits just to mesa_7_6_branch.
Diffstat (limited to 'progs/samples')
-rw-r--r--progs/samples/Makefile2
-rw-r--r--progs/samples/rgbtoppm.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/progs/samples/Makefile b/progs/samples/Makefile
index b300e38b9c2..64fa47addb5 100644
--- a/progs/samples/Makefile
+++ b/progs/samples/Makefile
@@ -10,7 +10,7 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(T
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
- font line logo nurb olympic overlay point prim quad select \
+ font line logo nurb olympic overlay point prim rgbtoppm quad select \
shape sphere star stencil stretch texture tri wave
diff --git a/progs/samples/rgbtoppm.c b/progs/samples/rgbtoppm.c
index 116d9a8cfa5..56ca5b0efe9 100644
--- a/progs/samples/rgbtoppm.c
+++ b/progs/samples/rgbtoppm.c
@@ -86,7 +86,8 @@ static ImageRec *ImageOpen(char *fileName)
exit(1);
}
if ((image->file = fopen(fileName, "rb")) == NULL) {
- return NULL;
+ free(image);
+ return NULL;
}
fread(image, 1, 12, image->file);
@@ -224,6 +225,7 @@ read_rgb_texture(char *name, int *width, int *height)
if (gbuf) free(gbuf);
if (bbuf) free(bbuf);
if (abuf) free(abuf);
+ ImageClose(image);
return NULL;
}
ptr = base;