From bf082caab7dfea697e7a69beacae1a1de78309c1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 3 Jul 2026 11:22:38 +0200 Subject: [PATCH] fix coverity #910690 --- common/crapto1/crypto1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/crapto1/crypto1.c b/common/crapto1/crypto1.c index 8ffe04fdb..5c8020e7b 100644 --- a/common/crapto1/crypto1.c +++ b/common/crapto1/crypto1.c @@ -47,8 +47,10 @@ void crypto1_init(struct Crypto1State *state, uint64_t key) { } void crypto1_deinit(struct Crypto1State *state) { - state->odd = 0; - state->even = 0; + if (state) { + state->odd = 0; + state->even = 0; + } } #if !defined(__arm__) || defined(__linux__) || defined(_WIN32) || defined(__APPLE__) // bare metal ARM Proxmark lacks calloc()/free()