Message ID | 165296424564.4207.5876769207032745575.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers | show |
Series | [thermal:,thermal/next] thermal/core: Fix memory leak in __thermal_cooling_device_register() | expand |
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 82654dc..cdc0552 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -947,6 +947,7 @@ __thermal_cooling_device_register(struct device_node *np, return cdev; out_kfree_type: + thermal_cooling_device_destroy_sysfs(cdev); kfree(cdev->type); put_device(&cdev->device); cdev = NULL;