All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Jesper Juhl <jj@chaosbits.net>,
	linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Michael Hennerich <michael.hennerich@analog.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Jonathan Cameron <jic23@cam.ac.uk>
Subject: Re: [PATCH] [staging] iio, adc: Do not leak memory in ad7280_event_handler()
Date: Mon, 07 Nov 2011 08:37:20 +0100	[thread overview]
Message-ID: <4EB78AB0.6070301@metafoo.de> (raw)
In-Reply-To: <4EB70100.8030703@kernel.org>

On 11/06/2011 10:49 PM, Jonathan Cameron wrote:
> On 11/06/2011 09:49 PM, Jesper Juhl wrote:
>> If ad7280_read_all_channels() returns <0 then we'll leak the memory
>> allocated to 'channels' when we return and that variable goes out of
>> scope.
>> This patch fixes the leak.
>>
> Looks right to me - good spot. Only choice is whether a single exit
> point makes sense rather than undwinding it here? Michael?
> I'm happy with either solution, hence the ack.

A similar patch has already been sent last week and should be in Gregs queue.
See: http://comments.gmane.org/gmane.linux.kernel.iio/2433

- Lars

  reply	other threads:[~2011-11-07  7:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 21:49 [PATCH] [staging] iio, adc: Do not leak memory in ad7280_event_handler() Jesper Juhl
2011-11-06 21:49 ` Jonathan Cameron
2011-11-07  7:37   ` Lars-Peter Clausen [this message]
2011-11-27  0:43 ` Greg KH
2011-12-05 22:48   ` Jesper Juhl

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=4EB78AB0.6070301@metafoo.de \
    --to=lars@metafoo.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=jic23@cam.ac.uk \
    --cc=jic23@kernel.org \
    --cc=jj@chaosbits.net \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=paul.gortmaker@windriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.