Mesa (master): svga: null out query's hwbuf pointer after destroying

Brian Paul brianp at kemper.freedesktop.org
Wed Mar 26 16:42:16 UTC 2014


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

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Mar 24 17:21:34 2014 -0600

svga: null out query's hwbuf pointer after destroying

Just to be extra safe.

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

---

 src/gallium/drivers/svga/svga_pipe_query.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/svga/svga_pipe_query.c b/src/gallium/drivers/svga/svga_pipe_query.c
index cdf463c..0283aa9 100644
--- a/src/gallium/drivers/svga/svga_pipe_query.c
+++ b/src/gallium/drivers/svga/svga_pipe_query.c
@@ -148,6 +148,7 @@ svga_destroy_query(struct pipe_context *pipe, struct pipe_query *q)
    switch (sq->type) {
    case PIPE_QUERY_OCCLUSION_COUNTER:
       sws->buffer_destroy(sws, sq->hwbuf);
+      sq->hwbuf = NULL;
       sws->fence_reference(sws, &sq->fence, NULL);
       break;
    case SVGA_QUERY_DRAW_CALLS:




More information about the mesa-commit mailing list