Mesa (master): r300g: Fix memory leak on error path.

Vinson Lee vlee at kemper.freedesktop.org
Thu Jun 10 00:33:55 PDT 2010


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

Author: Vinson Lee <vlee at vmware.com>
Date:   Thu Jun 10 00:33:25 2010 -0700

r300g: Fix memory leak on error path.

---

 src/gallium/drivers/r300/r300_transfer.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_transfer.c b/src/gallium/drivers/r300/r300_transfer.c
index f0b5e96..4f37fab 100644
--- a/src/gallium/drivers/r300/r300_transfer.c
+++ b/src/gallium/drivers/r300/r300_transfer.c
@@ -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;
                 }
             }



More information about the mesa-commit mailing list