diff --git a/lib/ipmi_sel.c b/lib/ipmi_sel.c index 4aaab1d..7406e27 100644 --- a/lib/ipmi_sel.c +++ b/lib/ipmi_sel.c @@ -587,6 +587,10 @@ get_supermicro_evt_desc(struct ipmi_intf *intf, struct sel_event_record *rec) /* check the chipset type */ oem_id = ipmi_get_oem_id(intf); if (oem_id == 0) { + if (desc != NULL) { + free(desc); + desc = NULL; + } return NULL; } length = sizeof(supermicro_X8);