Re: [PATCH] drivers/macintosh: Fix memleak in windfarm_pm112 driver

2020-05-20 Thread Michael Ellerman
On Thu, 23 Apr 2020 16:00:38 +1000, Michael Ellerman wrote: > create_cpu_loop() calls smu_sat_get_sdb_partition() which does > kmalloc() and returns the allocated buffer. In fact it's called twice, > and neither buffer is freed. > > This results in a memory leak as reported by Erhard: > unrefere

[PATCH] drivers/macintosh: Fix memleak in windfarm_pm112 driver

2020-04-22 Thread Michael Ellerman
create_cpu_loop() calls smu_sat_get_sdb_partition() which does kmalloc() and returns the allocated buffer. In fact it's called twice, and neither buffer is freed. This results in a memory leak as reported by Erhard: unreferenced object 0xc0047081f840 (size 32): comm "kwindfarm", pid 203,