Re: Distributed storage release.

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

 



Hi Sven.

On Thu, Sep 11, 2008 at 01:51:44AM +0200, Sven Wegener (sven.wegener@xxxxxxxxxxx) wrote:
> > +static void *dst_crypto_thread_init(void *data)
> > +{
> > +	struct dst_node *n = data;
> > +	struct dst_crypto_engine *e;
> > +	int err = -ENOMEM;
> > +
> > +	e = kzalloc(sizeof(struct dst_crypto_engine), GFP_KERNEL);
> > +	if (!e)
> > +		goto err_out_exit;
> > +	e->src = kzalloc(sizeof(struct scatterlist) * 2 * n->max_pages,
> > +			GFP_KERNEL);
> > +	if (!e->src)
> > +		goto err_out_free;
> > +
> > +	e->dst = e->src + n->max_pages;
> > +
> > +	err = dst_crypto_engine_init(e, n);
> > +	if (err)
> > +		goto err_out_free;
> > +
> > +	return e;
> > +
> > +err_out_free:
> > +	kfree(e->src);
> 
> You leak the memory allocated for e here.

Thanks a lot for pointing this out, I will fix it.

-- 
	Evgeniy Polyakov
--
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