public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@openedhand.com>
To: Satyam Sharma <satyam.sharma@gmail.com>
Cc: linux-crypto@vger.kernel.org,
	linux-mtd <linux-mtd@lists.infradead.org>,
	David Woodhouse <dwmw2@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	herbert@gondor.apana.org.au
Subject: Re: [PATCH 5/5] crypto: Add LZO compression support to the crypto interface
Date: Fri, 04 May 2007 09:39:23 +0100	[thread overview]
Message-ID: <1178267963.5839.10.camel@localhost.localdomain> (raw)
In-Reply-To: <a781481a0705040109r45cbf472i4094dd2ebf7841e8@mail.gmail.com>

On Fri, 2007-05-04 at 13:39 +0530, Satyam Sharma wrote:
> On 5/1/07, Richard Purdie <rpurdie@openedhand.com> wrote:
> > +static int lzo_init(struct crypto_tfm *tfm)
> > +{
> > +       struct lzo_ctx *ctx = crypto_tfm_ctx(tfm);
> > +
> > +       ctx->lzo_mem = vmalloc(LZO1X_MEM_COMPRESS);
> > +
> > +       if (!ctx->lzo_mem) {
> > +               vfree(ctx->lzo_mem);
> 
> Heh. What's (why's) this? You _can_ {k, v}free NULL but doing so after
> explicitly checking for it is ... ... insane!

True, there used to be two buffers allocated there and I've missed a
sensible cleanup when I removed one. I'll fix it, thanks.

Cheers,

Richard

  reply	other threads:[~2007-05-04  8:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01 14:47 [PATCH 5/5] crypto: Add LZO compression support to the crypto interface Richard Purdie
2007-05-04  8:09 ` Satyam Sharma
2007-05-04  8:39   ` Richard Purdie [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-05-04 11:31 Richard Purdie

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=1178267963.5839.10.camel@localhost.localdomain \
    --to=rpurdie@openedhand.com \
    --cc=dwmw2@infradead.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=satyam.sharma@gmail.com \
    /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