Re: [PATCH] pstore/ram: Fix memory leak in persistent_ram_new

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> In the implementation of persistent_ram_new(), if the allocation for prz
> fails, "label" should be released as part of error handling.

How did you come to this conclusion?

I suggest to reconsider this patch because the mentioned string is passed by
a function parameter.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/pstore/ram_core.c?id=37d4e84f765bb3038ddfeebdc5d1cfd7e1ef688f#n561
https://elixir.bootlin.com/linux/v5.5-rc1/source/fs/pstore/ram_core.c#L561

I recognise other implementation details which could be improved here.
https://lore.kernel.org/lkml/97737d95-d6aa-d24f-1af0-9d4895ceaed2@xxxxxxxxxxxxxxxxxxxxx/
https://lkml.org/lkml/2017/8/16/645

Regards,
Markus



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux