id, glhd: Fix segfault with misreferenced pipe member.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 23 Jun 2010 05:13:33 +0000 (22:13 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 23 Jun 2010 05:49:13 +0000 (22:49 -0700)
And remove the offending member to keep that from happening again.

src/gallium/drivers/galahad/glhd_objects.c
src/gallium/drivers/galahad/glhd_objects.h
src/gallium/drivers/identity/id_objects.c
src/gallium/drivers/identity/id_objects.h

index cea32d7ffec7a7341ae55c19d6f61d2f7e12939a..4682d717d8337949fb0aa659db733445eba80dec 100644 (file)
@@ -180,7 +180,7 @@ galahad_transfer_destroy(struct galahad_context *glhd_context,
                           struct galahad_transfer *glhd_transfer)
 {
    pipe_resource_reference(&glhd_transfer->base.resource, NULL);
-   glhd_transfer->pipe->transfer_destroy(glhd_context->pipe,
-                                       glhd_transfer->transfer);
+   glhd_context->pipe->transfer_destroy(glhd_context->pipe,
+                                        glhd_transfer->transfer);
    FREE(glhd_transfer);
 }
index 16e1d94469c76a7d7eb7f2951c5979fbe22e6993..935803915db73152e0705485468bc20ce103bf9e 100644 (file)
@@ -65,7 +65,6 @@ struct galahad_transfer
 {
    struct pipe_transfer base;
 
-   struct pipe_context *pipe;
    struct pipe_transfer *transfer;
 };
 
index ca4743f9ef725d2e33ce4ecaf60188d134b5f9fb..82d06e7f6055abebb0a31ae1e0baf5e03868a010 100644 (file)
@@ -180,8 +180,8 @@ identity_transfer_destroy(struct identity_context *id_context,
                           struct identity_transfer *id_transfer)
 {
    pipe_resource_reference(&id_transfer->base.resource, NULL);
-   id_transfer->pipe->transfer_destroy(id_context->pipe,
-                                       id_transfer->transfer);
+   id_context->pipe->transfer_destroy(id_context->pipe,
+                                      id_transfer->transfer);
    FREE(id_transfer);
 }
 
index 5eea10b0b5a7d6494662cb04f048aae2cacc239b..e8deabf4fc7f3df6d59c141298b39252b656e484 100644 (file)
@@ -65,7 +65,6 @@ struct identity_transfer
 {
    struct pipe_transfer base;
 
-   struct pipe_context *pipe;
    struct pipe_transfer *transfer;
 };