All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: Ilya Dryomov <ilya.dryomov@inktank.com>, ceph-devel@vger.kernel.org
Subject: Re: [PATCH] rbd: do not leak image_id in rbd_dev_v2_parent_info()
Date: Mon, 07 Jul 2014 17:40:30 -0500	[thread overview]
Message-ID: <53BB21DE.6090902@ieee.org> (raw)
In-Reply-To: <1404121556-4854-1-git-send-email-ilya.dryomov@inktank.com>

On 06/30/2014 04:45 AM, Ilya Dryomov wrote:
> image_id is leaked if the parent happens to have been recorded already.
> Fix it.

Looks good.

Reviewed-by: Alex Elder <elder@linaro.org>

> 
> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
> ---
>  drivers/block/rbd.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index d99aa81774f8..adedb393b374 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -4072,6 +4072,8 @@ static int rbd_dev_v2_parent_info(struct rbd_device *rbd_dev)
>  		parent_spec->snap_id = snap_id;
>  		rbd_dev->parent_spec = parent_spec;
>  		parent_spec = NULL;	/* rbd_dev now owns this */
> +	} else {
> +		kfree(image_id);
>  	}
>  
>  	/*
> 


      reply	other threads:[~2014-07-07 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30  9:45 [PATCH] rbd: do not leak image_id in rbd_dev_v2_parent_info() Ilya Dryomov
2014-07-07 22:40 ` Alex Elder [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=53BB21DE.6090902@ieee.org \
    --to=elder@ieee.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=ilya.dryomov@inktank.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.