All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: target-devel <target-devel@vger.kernel.org>,
	virtualization@lists.linux-foundation.org,
	kernel-janitors@vger.kernel.org, kvm@vger.kernel.org,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [patch 3/3 -next] tcm_vhost: call kfree() on an error path
Date: Thu, 12 Jul 2012 14:49:22 -0700	[thread overview]
Message-ID: <1342129762.18004.101.camel__27147.8760907941$1342129771$gmane$org@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20120712144852.GF24202@elgon.mountain>

On Thu, 2012-07-12 at 17:48 +0300, Dan Carpenter wrote:
> There is a memory leak here.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
> index 57d39c5..29850cb 100644
> --- a/drivers/vhost/tcm_vhost.c
> +++ b/drivers/vhost/tcm_vhost.c
> @@ -1420,6 +1420,7 @@ static struct se_wwn *tcm_vhost_make_tport(
>  
>  	pr_err("Unable to locate prefix for emulated Target Port:"
>  			" %s\n", name);
> +	kfree(tport);
>  	return ERR_PTR(-EINVAL);
>  
>  check_len:

Applied to for-next-merge, and folding the series into the initial merge
commit now..

Thank you!

--nab

      parent reply	other threads:[~2012-07-12 21:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 14:48 [patch 3/3 -next] tcm_vhost: call kfree() on an error path Dan Carpenter
2012-07-12 14:48 ` Dan Carpenter
2012-07-12 21:49 ` Nicholas A. Bellinger
2012-07-12 21:49   ` Nicholas A. Bellinger
2012-07-12 21:49 ` Nicholas A. Bellinger [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='1342129762.18004.101.camel__27147.8760907941$1342129771$gmane$org@haakon2.linux-iscsi.org' \
    --to=nab@linux-iscsi.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=target-devel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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.