graw: Fix file handle leaks.
authorVinson Lee <vlee@vmware.com>
Tue, 8 Jun 2010 01:34:13 +0000 (18:34 -0700)
committerVinson Lee <vlee@vmware.com>
Tue, 8 Jun 2010 01:34:13 +0000 (18:34 -0700)
src/gallium/tests/graw/fs-test.c
src/gallium/tests/graw/gs-test.c
src/gallium/tests/graw/vs-test.c

index d1c29b90b8634ec840f16491165c4afd7de7aa44..3389efb7ca86ec26a7743ebd75487c7ab493832a 100644 (file)
@@ -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);
 }
 
 
index 91b7b97ee042d07140f9c0d34cc2971fb0547e02..0a5a2c974a388a3bfb3cb59dfb65cd0bdcd487d5 100644 (file)
@@ -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);
 }
 
 
index e68f9f439b4b0710c9b2c81a056eff3c2d4c5bd8..7f93db42c0dc435f130b268f96970174940eefac 100644 (file)
@@ -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 )