r300g: Fix memory leak on error path.
authorVinson Lee <vlee@vmware.com>
Thu, 10 Jun 2010 07:33:25 +0000 (00:33 -0700)
committerVinson Lee <vlee@vmware.com>
Thu, 10 Jun 2010 07:33:25 +0000 (00:33 -0700)
src/gallium/drivers/r300/r300_transfer.c

index f0b5e9659dbbb96a9600bb6659b482618fe50df9..4f37fabb28984dcaa4212070bf8ff8b231b2aac8 100644 (file)
@@ -181,6 +181,7 @@ r300_texture_get_transfer(struct pipe_context *ctx,
                     /* Otherwise, go to hell. */
                     fprintf(stderr,
                         "r300: Failed to create a transfer object, praise.\n");
+                    FREE(trans);
                     return NULL;
                 }
             }