mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
Fix missing goto out_free;
when ipmi_parse_hex() returns (-1)
This commit is contained in:
parent
34711329c2
commit
2c99bf69ec
@ -499,10 +499,11 @@ ipmi_main(int argc, char ** argv,
|
|||||||
break;
|
break;
|
||||||
case 'y':
|
case 'y':
|
||||||
memset(kgkey, 0, sizeof(kgkey));
|
memset(kgkey, 0, sizeof(kgkey));
|
||||||
rc = ipmi_parse_hex(optarg, kgkey, sizeof(kgkey) - 1);
|
|
||||||
|
|
||||||
|
rc = ipmi_parse_hex(optarg, kgkey, sizeof(kgkey) - 1);
|
||||||
if (rc == -1) {
|
if (rc == -1) {
|
||||||
lprintf(LOG_ERR, "Number of Kg key characters is not even");
|
lprintf(LOG_ERR, "Number of Kg key characters is not even");
|
||||||
|
goto out_free;
|
||||||
} else if (rc == -3) {
|
} else if (rc == -3) {
|
||||||
lprintf(LOG_ERR, "Kg key is not hexadecimal number");
|
lprintf(LOG_ERR, "Kg key is not hexadecimal number");
|
||||||
goto out_free;
|
goto out_free;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user