diff options
author | Micah Elizabeth Scott <beth@torproject.org> | 2023-05-11 11:10:15 -0700 |
---|---|---|
committer | Micah Elizabeth Scott <beth@torproject.org> | 2023-05-11 11:10:15 -0700 |
commit | c71b6a14a391769261a08e96d0a1d90b5d1c9e11 (patch) | |
tree | 42531cc5b8b1a5c049039a27924895d0c19c12b8 /src/ext | |
parent | e643a708793f748bf7c3dd4978762429e51411cf (diff) | |
download | tor-c71b6a14a391769261a08e96d0a1d90b5d1c9e11.tar.gz tor-c71b6a14a391769261a08e96d0a1d90b5d1c9e11.zip |
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: Micah Elizabeth Scott <beth@torproject.org>
Diffstat (limited to 'src/ext')
-rw-r--r-- | src/ext/equix/hashx/src/context.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ext/equix/hashx/src/context.c b/src/ext/equix/hashx/src/context.c index de2144d46c..8548fb7ffa 100644 --- a/src/ext/equix/hashx/src/context.c +++ b/src/ext/equix/hashx/src/context.c @@ -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; |