Module: Mesa
Branch: 9.1
Commit: e94a89de4deeabd0f8347795385b2f098aa35365
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e94a89de4deeabd0f8347795385b2f098aa35365

Author: Vinson Lee <[email protected]>
Date:   Thu Jan 31 23:28:41 2013 -0800

swrast: Fix memory leak.

Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
(cherry picked from commit 985e710c0d1f4f3bbd18448f04e611bd57ae9100)

---

 src/mesa/drivers/dri/swrast/swrast.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/swrast/swrast.c 
b/src/mesa/drivers/dri/swrast/swrast.c
index 9638271..b380de3 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -363,6 +363,7 @@ swrast_new_renderbuffer(const struct gl_config *visual, 
__DRIdrawable *dPriv,
        xrb->bpp = 8;
        break;
     default:
+       free(xrb);
        return NULL;
     }
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to