Re: [PATCH] io_uring: free allocated io_memory once

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

 



On Tue, Apr 30, 2019 at 10:22:23AM -0600, Jens Axboe wrote:
> On 4/30/19 10:20 AM, Mark Rutland wrote:
> > -	io_mem_free(ctx->sq_ring);
> > -	io_mem_free(ctx->sq_sqes);
> > -	io_mem_free(ctx->cq_ring);
> > +	if (ctx->sq_ring)
> > +		io_mem_free(ctx->sq_ring);
> > +	if (ctx->sq_sqes)
> > +		io_mem_free(ctx->sq_sqes);
> > +	if (ctx->cq_ring)
> > +		io_mem_free(ctx->cq_ring);
> 
> Please just make io_mem_free() handle a NULL pointer so we don't need
> these checks.

Sure; I'll spin a v2 momentarily.

Thanks,
Mark.



[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