linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Sven Wegener <sven.wegener@stealer.net>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: Distributed storage release.
Date: Thu, 11 Sep 2008 08:23:46 +0400	[thread overview]
Message-ID: <20080911042345.GA8570@2ka.mipt.ru> (raw)
In-Reply-To: <alpine.LNX.2.00.0809110054020.1542@titan.stealer.net>

Hi Sven.

On Thu, Sep 11, 2008 at 01:51:44AM +0200, Sven Wegener (sven.wegener@stealer.net) 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

  reply	other threads:[~2008-09-11  4:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 11:38 Distributed storage release Evgeniy Polyakov
2008-09-10 23:51 ` Sven Wegener
2008-09-11  4:23   ` Evgeniy Polyakov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-10-06 16:00 Evgeniy Polyakov
2008-10-13  2:24 ` Andrew Morton
2008-10-13 13:38   ` Evgeniy Polyakov
2008-10-13 13:44     ` Pekka Enberg
2008-10-13 14:14       ` Evgeniy Polyakov
2008-10-14 15:51     ` Andreas Dilger
2008-10-14 16:12       ` Evgeniy Polyakov
2008-10-14 20:35         ` Andreas Dilger
2008-10-14 21:08           ` Evgeniy Polyakov
2008-10-14 21:23             ` Matthew Wilcox
2008-10-14 21:31               ` Evgeniy Polyakov
2008-10-13 17:20 Evgeniy Polyakov
2008-10-14 23:23 ` Evgeniy Polyakov
2008-10-14 23:57   ` Evgeniy Polyakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080911042345.GA8570@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sven.wegener@stealer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).