st/mesa: fix memory leaks
authorMorgan Armand <morgan.devel@gmail.com>
Mon, 7 Nov 2011 18:38:32 +0000 (19:38 +0100)
committerBrian Paul <brianp@vmware.com>
Mon, 7 Nov 2011 20:25:46 +0000 (13:25 -0700)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_drawpixels.c

index 8c49f8d187ac3c97d2369202651d45ee94de6aa7..5714d343d57c0b66605b2a75b67647b80e892e44 100644 (file)
@@ -1638,9 +1638,9 @@ st_destroy_drawpix(struct st_context *st)
 
    st_reference_fragprog(st, &st->pixel_xfer.combined_prog, NULL);
    if (st->drawpix.vert_shaders[0])
-      ureg_free_tokens(st->drawpix.vert_shaders[0]);
+      cso_delete_vertex_shader(st->cso_context, st->drawpix.vert_shaders[0]);
    if (st->drawpix.vert_shaders[1])
-      ureg_free_tokens(st->drawpix.vert_shaders[1]);
+      cso_delete_vertex_shader(st->cso_context, st->drawpix.vert_shaders[1]);
 }
 
 #endif /* FEATURE_drawpix */