Mesa (master): graw: Fix file handle leaks.

Vinson Lee vlee at kemper.freedesktop.org
Mon Jun 7 18:34:28 PDT 2010


Module: Mesa
Branch: master
Commit: 380f08f4ec6653aa4ba3e3d36587a31132706f0e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=380f08f4ec6653aa4ba3e3d36587a31132706f0e

Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Jun  7 18:34:13 2010 -0700

graw: Fix file handle leaks.

---

 src/gallium/tests/graw/fs-test.c |    1 +
 src/gallium/tests/graw/gs-test.c |    1 +
 src/gallium/tests/graw/vs-test.c |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c
index d1c29b9..3389efb 100644
--- a/src/gallium/tests/graw/fs-test.c
+++ b/src/gallium/tests/graw/fs-test.c
@@ -223,6 +223,7 @@ static void set_fragment_shader( const char *filename )
 
    handle = graw_parse_fragment_shader(ctx, buf);
    ctx->bind_fs_state(ctx, handle);
+   fclose(f);
 }
 
 
diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c
index 91b7b97..0a5a2c9 100644
--- a/src/gallium/tests/graw/gs-test.c
+++ b/src/gallium/tests/graw/gs-test.c
@@ -238,6 +238,7 @@ static void set_geometry_shader( void )
 
    handle = graw_parse_geometry_shader(ctx, buf);
    ctx->bind_gs_state(ctx, handle);
+   fclose(f);
 }
 
 
diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c
index e68f9f4..7f93db4 100644
--- a/src/gallium/tests/graw/vs-test.c
+++ b/src/gallium/tests/graw/vs-test.c
@@ -202,6 +202,7 @@ static void set_vertex_shader( void )
 
    handle = graw_parse_vertex_shader(ctx, buf);
    ctx->bind_vs_state(ctx, handle);
+   fclose(f);
 }
 
 static void set_fragment_shader( void )



More information about the mesa-commit mailing list