From: Tim Kourt <tim.a.kourt@linux.intel.com>
To: iwd@lists.01.org
Subject: [PATCH] client: Init variable before usage
Date: Fri, 18 Oct 2019 14:58:03 -0700 [thread overview]
Message-ID: <20191018215803.19398-1-tim.a.kourt@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
Uninitialized 'password' variable used to cause an error when --password
option wasn't avaiable
---
client/agent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/agent.c b/client/agent.c
index 5844acdd..5ed6538f 100644
--- a/client/agent.c
+++ b/client/agent.c
@@ -240,7 +240,7 @@ static struct l_dbus_message *request_user_password_command_option(
struct l_dbus_message *message)
{
struct l_dbus_message *reply;
- const char *password;
+ const char *password = NULL;
command_option_get(COMMAND_OPTION_PASSWORD, &password);
if (!password)
--
2.13.6
next reply other threads:[~2019-10-18 21:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 21:58 Tim Kourt [this message]
2019-10-21 16:03 ` [PATCH] client: Init variable before usage Denis Kenzior
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=20191018215803.19398-1-tim.a.kourt@linux.intel.com \
--to=tim.a.kourt@linux.intel.com \
--cc=iwd@lists.01.org \
/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