mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 10:37:22 +00:00
Make sure to release malloc()-ed data when fread() fail to read board
type data (Coverity CID 1149052).
This commit is contained in:
parent
4e220bebb0
commit
135977a497
@ -2745,6 +2745,7 @@ ipmi_ek_display_board_info_area(FILE * input_file, char * board_type,
|
||||
ret = fread(data, size_board, 1, input_file);
|
||||
if ((ret != 1) || ferror(input_file)) {
|
||||
lprintf(LOG_ERR, "Invalid board type size!");
|
||||
free(data);
|
||||
goto out;
|
||||
}
|
||||
printf("%s type: 0x%02x\n", board_type, len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user