summaryrefslogtreecommitdiff
path: root/tests/spec/glx_arb_create_context/no-error.c
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2022-06-01 14:50:19 -0700
committerVinson Lee <vlee@freedesktop.org>2022-06-17 22:02:57 -0700
commit68faa3287314ad89b323121f617ade344ac2ea68 (patch)
tree1c2deebaea94c09049d715d4888ab857f2d102f2 /tests/spec/glx_arb_create_context/no-error.c
parent31fdb811388940c8f31de4335ab497ea79a88555 (diff)
glx_arb_create_context: Initialize variable.
Fix defect reported by Coverity Scan. Uninitialized pointer read (UNINIT) uninit_use_in_call: Using uninitialized value ctx when calling glXDestroyContext. Fixes: 4991384f1 ("glx: add test for GLX_ARB_create_context_no_error") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/692>
Diffstat (limited to 'tests/spec/glx_arb_create_context/no-error.c')
-rw-r--r--tests/spec/glx_arb_create_context/no-error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/spec/glx_arb_create_context/no-error.c b/tests/spec/glx_arb_create_context/no-error.c
index b85e30448..8a4b05d1e 100644
--- a/tests/spec/glx_arb_create_context/no-error.c
+++ b/tests/spec/glx_arb_create_context/no-error.c
@@ -43,7 +43,7 @@ static enum piglit_result check_no_error(bool debug, bool robust)
None
};
static bool is_dispatch_init = false;
- GLXContext ctx;
+ GLXContext ctx = NULL;
enum piglit_result result = PIGLIT_SKIP;
printf("info: debug=%s, robustness=%s\n", BOOLSTR(debug), BOOLSTR(robust));