From: Vinson Lee Date: Sat, 3 Aug 2013 06:39:24 +0000 (-0700) Subject: postprocess: Check ppq is null before calling pp_free_bos. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8294d969e1c2154721eb34dff5848b64f4604308;p=mesa.git postprocess: Check ppq is null before calling pp_free_bos. pp_free_bos dereferences ppq without a null check. Fixes "Dereference before null check" defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/gallium/auxiliary/postprocess/pp_init.c b/src/gallium/auxiliary/postprocess/pp_init.c index 201a357617a..a49a23d11d4 100644 --- a/src/gallium/auxiliary/postprocess/pp_init.c +++ b/src/gallium/auxiliary/postprocess/pp_init.c @@ -169,7 +169,9 @@ pp_free(struct pp_queue_t *ppq) { unsigned int i, j; - pp_free_fbos(ppq); + if (ppq) { + pp_free_fbos(ppq); + } if (ppq && ppq->p) { if (ppq->p->pipe && ppq->filters && ppq->shaders) {