From: Matt Turner Date: Mon, 16 May 2016 22:31:00 +0000 (-0700) Subject: mesa: fclose() filename on error. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=caab3cd5361d8848e8f8957f697aff7bca5fc6b3;p=mesa.git mesa: fclose() filename on error. Pretty useless, as it's in debugging code. Found by Coverity (CID 1257016). --- diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 6dfb84be9aa..b15826c5a2b 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -10054,8 +10054,12 @@ print_list(struct gl_context *ctx, GLuint list, const char *fname) } dlist = _mesa_lookup_list(ctx, list); - if (!dlist) + if (!dlist) { + if (fname) { + fclose(f); + } return; + } n = dlist->Head;