On Tue, Mar 26, 2019 at 10:48:30AM +0100, Václav Doležal wrote: You don't give any information here about this. Was it a crash? Was it found by code analysis? Is it theoretical?
It's fine otherwise, but I would like the info if possible. -corey > Signed-off-by: Vaclav Dolezal <vdole...@redhat.com> > --- > lib/control.c | 4 +++- > lib/sensor.c | 4 +++- > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/lib/control.c b/lib/control.c > index 64df4dac..b3feefd2 100644 > --- a/lib/control.c > +++ b/lib/control.c > @@ -437,7 +437,9 @@ control_final_destroy(ipmi_control_t *control) > if (control->oem_info_cleanup_handler) > control->oem_info_cleanup_handler(control, control->oem_info); > > - i_ipmi_entity_put(control->entity); > + if (control->entity) > + i_ipmi_entity_put(control->entity); > + > ipmi_mem_free(control); > } > > diff --git a/lib/sensor.c b/lib/sensor.c > index 96aef5f6..084522fb 100644 > --- a/lib/sensor.c > +++ b/lib/sensor.c > @@ -1046,7 +1046,9 @@ sensor_final_destroy(ipmi_sensor_t *sensor) > if (sensor->oem_info_cleanup_handler) > sensor->oem_info_cleanup_handler(sensor, sensor->oem_info); > > - i_ipmi_entity_put(sensor->entity); > + if (sensor->entity) > + i_ipmi_entity_put(sensor->entity); > + > ipmi_mem_free(sensor); > } > > -- > 2.20.1 > > > > _______________________________________________ > Openipmi-developer mailing list > Openipmi-developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openipmi-developer _______________________________________________ Openipmi-developer mailing list Openipmi-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openipmi-developer