Re: [PATCH v2 1/2] phy: sunplus: fix memory leak in update_disc_vol()

Markus Elfring <[email protected]>
Newsgroups gmane.linux.kernel.janitors,gmane.linux.usb.general,gmane.linux.kernel
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.