From 50bd7d01a81ae82626281c470169544e86c360ce Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Fri, 19 Dec 2014 08:49:20 +0100 Subject: [PATCH] Don't use tmp variable since it's not necessary in ipmi_user_test() --- lib/ipmi_user.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/ipmi_user.c b/lib/ipmi_user.c index 24e2828..fbe6d4c 100644 --- a/lib/ipmi_user.c +++ b/lib/ipmi_user.c @@ -573,18 +573,13 @@ ipmi_user_test(struct ipmi_intf *intf, int argc, char **argv) } if (argc == 3) { /* We need to prompt for a password */ - char *tmp; const char *password_prompt = ipmi_user_build_password_prompt(user_id); # ifdef HAVE_GETPASSPHRASE - tmp = getpassphrase(password_prompt); + password = getpassphrase(password_prompt); # else - tmp = (char*)getpass(password_prompt); + password = (char*)getpass(password_prompt); # endif - if (tmp != NULL) { - password = strdup(tmp); - tmp = NULL; - } if (password == NULL) { lprintf(LOG_ERR, "ipmitool: malloc failure"); return (-1);