summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-16 15:31:00 -0700
committerMatt Turner <[email protected]>2016-05-18 11:09:37 -0700
commitcaab3cd5361d8848e8f8957f697aff7bca5fc6b3 (patch)
treee6307688f950e80c489e95a54d1e6f5c8334f8eb
parentcbb0e3a7e8fffa4d5c5af8660d99cd3da8af97ec (diff)
mesa: fclose() filename on error.
Pretty useless, as it's in debugging code. Found by Coverity (CID 1257016).
-rw-r--r--src/mesa/main/dlist.c6
1 files changed, 5 insertions, 1 deletions
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;