Re: [PATCH v2 1/2] phy: sunplus: fix memory leak in update_disc_vol()
Markus Elfring <[email protected]>
| Newsgroups | org.infradead.lists.linux-phy,org.kernel.vger.kernel-janitors,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb |
|---|---|
| Message-ID | <[email protected]> |
> nvmem_cell_read() returns a kmalloc'd buffer that update_disc_vol() > never freed. Free it after extracting the disconnect-voltage value. How do you think about to apply the attribute “__free(kfree)” also in such a function implementation? https://elixir.bootlin.com/linux/v7.2/source/include/linux/slab.h#L596 Regards, Markus -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy