From: Bastien Nocera <hadess@hadess.net>
To: ell@lists.linux.dev
Cc: Bastien Nocera <hadess@hadess.net>
Subject: [PATCH v2 2/2] cert: Fix uninitialised variable
Date: Wed, 12 Aug 2026 11:11:21 +0200 [thread overview]
Message-ID: <20260812091158.2134810-2-hadess@hadess.net> (raw)
In-Reply-To: <20260812091158.2134810-1-hadess@hadess.net>
In file included from ./ell/util.h:20,
from ell/private.h:8,
from ell/cert.c:18:
In function '_l_l_free_cleanup',
inlined from 'cert_set_filter_by_validity' at ell/cert.c:618:33,
inlined from 'l_certchain_verify' at ell/cert.c:729:20:
./ell/util.h:257:21: warning: 'valid' may be used uninitialized [-Wmaybe-uninitialized]
257 | DEFINE_CLEANUP_FUNC(l_free);
ell/cert.c: In function 'l_certchain_verify':
ell/cert.c:618:40: note: 'valid' was declared here
618 | _auto_(l_free) struct l_cert **valid;
| ^~~~~
---
Changes since v1:
- None
ell/cert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ell/cert.c b/ell/cert.c
index ac9bdb7ee9e2..ad0d91c5f073 100644
--- a/ell/cert.c
+++ b/ell/cert.c
@@ -615,7 +615,7 @@ static struct l_cert **cert_set_filter_by_validity(struct l_queue *set,
int *out_valid)
{
const struct l_queue_entry *entry;
- _auto_(l_free) struct l_cert **valid;
+ _auto_(l_free) struct l_cert **valid = NULL;
*out_total = l_queue_length(set);
*out_valid = 0;
--
2.55.0
prev parent reply other threads:[~2026-08-12 9:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 9:11 [PATCH v2 1/2] settings: Fix uninitialised use Bastien Nocera
2026-08-12 9:11 ` Bastien Nocera [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260812091158.2134810-2-hadess@hadess.net \
--to=hadess@hadess.net \
--cc=ell@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox