On Fri, Aug 07, 2026 at 01:30:20AM +0300, Michail Tatas wrote: > In case that ida_alloc(&ipmi_bmc_ida,...) succeeds and then > platform_device_register() fails, ipmi_bmc_ida is leaked. > Fix by freeing the error path
You are correct, added to my next tree. Thank you. -corey > > Signed-off-by: Michail Tatas <[email protected]> > --- > drivers/char/ipmi/ipmi_msghandler.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/char/ipmi/ipmi_msghandler.c > b/drivers/char/ipmi/ipmi_msghandler.c > index 6ff9a15cced8..7634dff99f41 100644 > --- a/drivers/char/ipmi/ipmi_msghandler.c > +++ b/drivers/char/ipmi/ipmi_msghandler.c > @@ -3301,6 +3301,7 @@ static int __ipmi_bmc_register(struct ipmi_smi *intf, > list_del(&intf->bmc_link); > mutex_unlock(&bmc->dyn_mutex); > intf->bmc = &intf->tmp_bmc; > + ida_free(&ipmi_bmc_ida, bmc->pdev.id); > put_device(&bmc->pdev.dev); > goto out; > } > -- > 2.43.0 > _______________________________________________ Openipmi-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openipmi-developer
