Skip to content
Snippets Groups Projects
Commit c71b6a14 authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

equix: avoid a coverity warning in hashx_alloc()


This addresses one of the warnings in issue #40792. As far as I can tell
this is a false positive, since the use of "ctx->type" in hashx_free()
can only be hit after the unioned code/program pointer is non-NULL. It's
no big deal to zero this value explicitly to silence the warning though.

Signed-off-by: default avatarMicah Elizabeth Scott <beth@torproject.org>
parent e643a708
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ hashx_ctx* hashx_alloc(hashx_type type) {
goto failure;
}
ctx->code = NULL;
ctx->type = 0;
if (type & HASHX_COMPILED) {
if (!hashx_compiler_init(ctx)) {
goto failure;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment