From: Emmanuel VAUTRIN <emmanuel.vautrin@gmail.com>
To: connman@lists.linux.dev
Cc: Emmanuel VAUTRIN <Emmanuel.VAUTRIN@cpexterne.org>
Subject: [PATCH 3/3] build: Fix uninitialized false positive in dnsproxy
Date: Mon, 18 Oct 2021 10:16:02 +0200 [thread overview]
Message-ID: <20211018081602.82984-3-Emmanuel.VAUTRIN@cpexterne.org> (raw)
In-Reply-To: <20211018081602.82984-1-Emmanuel.VAUTRIN@cpexterne.org>
gcc reports with:
git/src/dnsproxy.c: In function 'update_domain':
git/src/dnsproxy.c:2735:4: error: 'dom' may be used uninitialized in this function [-Werror=maybe-uninitialized]
2735 | g_free(dom);
| ^~~~~~~~~~~
---
src/dnsproxy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 4b65b3790bb9..fbbee0413f8f 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -2707,7 +2707,7 @@ static void update_domain(int index, const char *domain, bool append)
for (list = server_list; list; list = list->next) {
struct server_data *data = list->data;
GList *dom_list;
- char *dom;
+ char *dom = NULL;
bool dom_found = false;
if (data->index < 0)
--
2.25.1
next prev parent reply other threads:[~2021-10-18 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 8:16 [PATCH 1/3] build: Cleanup of iwd provision_service_wifi() Emmanuel VAUTRIN
2021-10-18 8:16 ` [PATCH 2/3] build: Fix uninitialized errors in iptables tests Emmanuel VAUTRIN
2021-10-18 8:16 ` Emmanuel VAUTRIN [this message]
2021-10-20 6:08 ` [PATCH 1/3] build: Cleanup of iwd provision_service_wifi() Daniel Wagner
2021-10-20 6:13 ` Daniel Wagner
2021-10-20 14:31 ` VAUTRIN Emmanuel (Canal Plus Prestataire)
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=20211018081602.82984-3-Emmanuel.VAUTRIN@cpexterne.org \
--to=emmanuel.vautrin@gmail.com \
--cc=Emmanuel.VAUTRIN@cpexterne.org \
--cc=connman@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;
as well as URLs for NNTP newsgroup(s).