mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
Don't use tmp variable since it's not necessary in ipmi_user_test()
This commit is contained in:
parent
4d3decc4c0
commit
50bd7d01a8
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user