dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Christophe Varoqui <christophe.varoqui@gmail.com>
Subject: Re: Memory leak if failed to do RTPG.
Date: Wed, 3 Nov 2010 16:53:46 -0400	[thread overview]
Message-ID: <20101103205346.GA26473@redhat.com> (raw)
In-Reply-To: <1239228685-5658-1-git-send-email-konrad@virtualiron.com>

This patch is still queued in dm-devel's patchwork and is still relevant
to upstream's multipath-tools:
https://patchwork.kernel.org/patch/17280/

On Wed, Apr 08 2009 at  6:11pm -0400,
Konrad Rzeszutek <konrad@virtualiron.com> wrote:

> We don't de-alloc the buf variable if we fail on the first
> do_rtpg call.
> ---
>  libmultipath/prioritizers/alua_rtpg.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libmultipath/prioritizers/alua_rtpg.c b/libmultipath/prioritizers/alua_rtpg.c
> index 7151cdd..5a8a59f 100644
> --- a/libmultipath/prioritizers/alua_rtpg.c
> +++ b/libmultipath/prioritizers/alua_rtpg.c
> @@ -263,7 +263,7 @@ get_asymmetric_access_state(int fd, unsigned int tpg)
>  	}
>  	rc = do_rtpg(fd, buf, buflen);
>  	if (rc < 0)
> -		return rc;
> +		goto out;
>  	scsi_buflen = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3];
>  	if (buflen < (scsi_buflen + 4)) {
>  		free(buf);
> -- 
> 1.5.4.1
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

      reply	other threads:[~2010-11-03 20:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 22:11 [PATCH] [prio] Memory leak if failed to do RTPG Konrad Rzeszutek
2010-11-03 20:53 ` Mike Snitzer [this message]

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=20101103205346.GA26473@redhat.com \
    --to=snitzer@redhat.com \
    --cc=christophe.varoqui@gmail.com \
    --cc=dm-devel@redhat.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;
as well as URLs for NNTP newsgroup(s).