Make sure to set free()ed pointer to NULL immediately, as specified by

<URL: http://sourceforge.net/p/ipmitool/wiki/coding_standards/ >.
This commit is contained in:
Petter Reinholdtsen 2014-01-11 07:43:12 +00:00
parent 99fff91f9d
commit 86cb5ee175

View File

@ -2746,6 +2746,7 @@ ipmi_ek_display_board_info_area(FILE * input_file, char * board_type,
if ((ret != 1) || ferror(input_file)) { if ((ret != 1) || ferror(input_file)) {
lprintf(LOG_ERR, "Invalid board type size!"); lprintf(LOG_ERR, "Invalid board type size!");
free(data); free(data);
data = NULL;
goto out; goto out;
} }
printf("%s type: 0x%02x\n", board_type, len); printf("%s type: 0x%02x\n", board_type, len);