All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darren Jenkins\\" <darrenrjenkins@gmail.com>
To: kernel Janitors <kernel-janitors@lists.osdl.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-ide@vger.kernel.org, gadio@netvision.net.il
Subject: [PATCH] drivers/ide/ide-tape.c: remove double kfree
Date: Sun, 29 Jun 2008 08:34:34 +1000	[thread overview]
Message-ID: <1214692474.8254.22.camel@localhost.localdomain> (raw)

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>


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)



             reply	other threads:[~2008-06-29 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-28 22:34 Darren Jenkins\ [this message]
2008-06-29 16:26 ` [PATCH] drivers/ide/ide-tape.c: remove double kfree Borislav Petkov
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=1214692474.8254.22.camel@localhost.localdomain \
    --to=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 \
    /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.