Skip to contentSkip to conversation

client: Init variable before usage

PATCH Applied Tim Kourt 2 participants 2 messages Oct 18, 2019 – Oct 21, 2019

lore
Share & tools
lore

Tim Kourt

author
#0 lore raw

PATCH 1/1 client: Init variable before usage

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(-)
client/agent.c +1 -1
index 5844acdd..5ed6538f 100644
@@ -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)
Signature · 1 line
2.13.6
#1 lore raw

Hi Tim,

Quoted 6 lines · Tim Kourt

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(-)

Applied, thanks.

Regards,
-Denis