Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1735567
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf |
| Date | 2017-09-20 09:00 +0200 |
| Message-ID | <urH9g-7S7-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Free memory region, if arm_pmu_acpi_probe is not successful.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/perf/arm_pmu_acpi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
index 0a9b787..3303dd8 100644
--- a/drivers/perf/arm_pmu_acpi.c
+++ b/drivers/perf/arm_pmu_acpi.c
@@ -235,6 +235,7 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn)
ret = armpmu_register(pmu);
if (ret) {
pr_warn("Failed to register PMU for CPU%d\n", cpu);
+ kfree(pmu->name);
return ret;
}
}
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-09-20 09:00 +0200
Re: [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf Will Deacon <will.deacon@arm.com> - 2017-09-22 13:00 +0200
Re: [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf Catalin Marinas <catalin.marinas@arm.com> - 2017-09-22 16:20 +0200
csiph-web