mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
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>
This commit is contained in:
parent
e643a70879
commit
c71b6a14a3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user