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

Author: Vinson Lee <[email protected]>
Date:   Wed Jan  9 08:09:00 2013 +0100

r600g: Fix memory leak in r600_bytecode_add_vtx.

Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <[email protected]>

---

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

diff --git a/src/gallium/drivers/r600/r600_asm.c 
b/src/gallium/drivers/r600/r600_asm.c
index ef67717..d324d59 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -1625,6 +1625,7 @@ int r600_bytecode_add_vtx(struct r600_bytecode *bc, const 
struct r600_bytecode_v
                        break;
                default:
                        R600_ERR("Unknown chip class %d.\n", bc->chip_class);
+                       free(nvtx);
                        return -EINVAL;
                }
        }

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

Reply via email to