Re: [PATCH] null_blk: fix memory leak on cleanup

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

 



On Mon, Aug 31, 2015 at 02:17:18PM +0200, Matias Bjørling wrote:
> From: Matias Bjørling <mb@xxxxxxxxxxx>
> 
> Driver was not freeing the memory allocated for internal nullb queues.
> This patch frees the memory during driver unload.

You may want to consider devm_* style allocations instead.  These are freed
automatically on driver unload, simplifying your error paths and your unload
logic as well as preventing leaks.

See this patch for an example:

https://lkml.org/lkml/2015/8/10/992
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux