From: Daniel Salzman Date: Wed, 17 Sep 2025 06:29:16 +0000 (+0200) Subject: digest: avoid freeing a local variable (clang analyzer) X-Git-Tag: v3.5.0~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bc657c2a4b5782eb7dd712233fa089fbf65bc8fc;p=thirdparty%2Fknot-dns.git digest: avoid freeing a local variable (clang analyzer) --- diff --git a/src/knot/zone/digest.c b/src/knot/zone/digest.c index c6f03e9047..5bcb46328b 100644 --- a/src/knot/zone/digest.c +++ b/src/knot/zone/digest.c @@ -262,7 +262,9 @@ int zone_update_add_digest(struct zone_update *update, int algorithm, bool place ret = zone_update_remove(update, &exists); if (ret != KNOT_EOK && ret != KNOT_ENOENT) { - free(digest); + if (digest != &zero) { + free(digest); + } return ret; } }