mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <petkovbb@googlemail.com>
To: Darren Jenkins <darrenrjenkins@gmail.com>, bzolnier@gmail.com
Cc: kernel Janitors <kernel-janitors@lists.osdl.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-ide@vger.kernel.org, gadio@netvision.net.il
Subject: Re: [PATCH] drivers/ide/ide-tape.c: remove double kfree
Date: Sun, 29 Jun 2008 18:26:44 +0200	[thread overview]
Message-ID: <20080629162644.GA10023@gollum.tnic> (raw)
In-Reply-To: <1214692474.8254.22.camel@localhost.localdomain>

Hi Bart,

in case you haven't picked that one up already...

On Sun, Jun 29, 2008 at 08:34:34AM +1000, Darren Jenkins" wrote:
> G'day people,
> 
> 
> Coverity CID: 2336 USE_AFTER_FREE
> 
> drivers/ide/ide-tape.c ide_tape_kfree_buffer() double free's a pointer
> (hint freed by an alias in first outer loop).
> This patch simply removes the superfluous kfree().
> 
> 
> 
> Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
> 
> 
> diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
> index 1e1f263..86164be 100644
> --- a/drivers/ide/ide-tape.c
> +++ b/drivers/ide/ide-tape.c
> @@ -600,7 +600,6 @@ static void ide_tape_kfree_buffer(idetape_tape_t *tape)
>  		bh = bh->b_reqnext;
>  		kfree(prev_bh);
>  	}
> -	kfree(tape->merge_bh);
>  }
>  
>  static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects)
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Regards/Gruß,
    Boris.

  reply	other threads:[~2008-06-29 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-28 22:34 Darren Jenkins\
2008-06-29 16:26 ` Borislav Petkov [this message]
2008-06-30 20:45   ` Bartlomiej Zolnierkiewicz

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=20080629162644.GA10023@gollum.tnic \
    --to=petkovbb@googlemail.com \
    --cc=bzolnier@gmail.com \
    --cc=darrenrjenkins@gmail.com \
    --cc=gadio@netvision.net.il \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@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

all inboxes | Powered by JetHome®