From: Vinson Lee Date: Fri, 1 Feb 2013 07:28:41 +0000 (-0800) Subject: swrast: Fix memory leak. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=985e710c0d1f4f3bbd18448f04e611bd57ae9100;p=mesa.git swrast: Fix memory leak. Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 96382718a8e..b380de3078c 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; }