Skip to contentSkip to conversation

drivers/ide/ide-tape.c: remove double kfree

PATCH Applied Darren Jenkins\ 3 participants 3 messages Jun 29, 2008 – Jun 30, 2008 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/ide/ide-tape.c: remove double kfree

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().

drivers/ide/ide-tape.c +0 -1
index 1e1f263..86164be 100644
@@ -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)
Acked-by on v1 1/1
#1 lore raw

Hi Bart,

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

Quoted 5 lines · Darren Jenkins

G'day people,

Coverity CID: 2336 USE_AFTER_FREE

Quoted 7 lines

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().

Quoted 21 lines
drivers/ide/ide-tape.c +0 -2
index 1e1f263..86164be 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Regards/Gruß,
    Boris.
#2 lore raw
Quoted 10 lines · Borislav Petkov

Hi Bart,

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

Quoted 5 lines · Darren Jenkins

G'day people,

Coverity CID: 2336 USE_AFTER_FREE

Quoted 8 lines
Quoted 7 lines

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().

applied