mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
ID: 3613575 - memory leak - ipmi_password_file_read()
Commit fixes memory leak in ipmi_password_file_read() in 'lib/ipmi_main.c'.
This commit is contained in:
parent
cc48c433fd
commit
38d71179e9
@ -112,6 +112,7 @@ ipmi_password_file_read(char * filename)
|
||||
if (fp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to open password file %s",
|
||||
filename);
|
||||
free(pass);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -119,6 +120,7 @@ ipmi_password_file_read(char * filename)
|
||||
if (fgets(pass, 21, fp) == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to read password from file %s",
|
||||
filename);
|
||||
free(pass);
|
||||
fclose(fp);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user