浏览代码

platform-x86: intel_mid_thermal: Fix memory leak

Signed-off-by: Ameya Palande <2ameya@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Ameya Palande 14 年之前
父节点
当前提交
239dca9e9a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/platform/x86/intel_mid_thermal.c

+ 1 - 0
drivers/platform/x86/intel_mid_thermal.c

@@ -527,6 +527,7 @@ static int mid_thermal_remove(struct platform_device *pdev)
 	for (i = 0; i < MSIC_THERMAL_SENSORS; i++)
 		thermal_zone_device_unregister(pinfo->tzd[i]);
 
+	kfree(pinfo);
 	platform_set_drvdata(pdev, NULL);
 
 	/* Stop the ADC */