From: Vinson Lee Date: Wed, 9 Jan 2013 07:09:00 +0000 (+0100) Subject: r600g: Fix memory leak in r600_bytecode_add_vtx. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b37930f309a2e04f242a171152cb7c6c4300266a;p=mesa.git r600g: Fix memory leak in r600_bytecode_add_vtx. Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee --- diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index ef677170a5b..d324d59f48d 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; } }