projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9553a42
)
progs/vp: Fix memory leak in vp-tris.c.
author
Vinson Lee
<vlee@vmware.com>
Fri, 20 Nov 2009 06:59:01 +0000
(22:59 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Fri, 20 Nov 2009 06:59:01 +0000
(22:59 -0800)
progs/vp/vp-tris.c
patch
|
blob
|
history
diff --git
a/progs/vp/vp-tris.c
b/progs/vp/vp-tris.c
index 1356242d971d9c57405d4c1a898fa9fa8e0048f6..29cd027b00c2ef70138d0759362b764d0b7161f1 100644
(file)
--- a/
progs/vp/vp-tris.c
+++ b/
progs/vp/vp-tris.c
@@
-99,9
+99,11
@@
static void Init( void )
sz = (GLuint) fread(buf, 1, sizeof(buf), f);
if (!feof(f)) {
fprintf(stderr, "file too long\n");
+ fclose(f);
exit(1);
}
+ fclose(f);
fprintf(stderr, "%.*s\n", sz, buf);
if (strncmp( buf, "!!VP", 4 ) == 0) {