diff options
author | Vinson Lee <vlee@freedesktop.org> | 2022-06-01 14:50:19 -0700 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2022-06-17 22:02:57 -0700 |
commit | 68faa3287314ad89b323121f617ade344ac2ea68 (patch) | |
tree | 1c2deebaea94c09049d715d4888ab857f2d102f2 | |
parent | 31fdb811388940c8f31de4335ab497ea79a88555 (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>
-rw-r--r-- | tests/spec/glx_arb_create_context/no-error.c | 2 |
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)); |