aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-03-10 15:20:42 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 15:58:02 -0700
commitb4c8997c1f1ba84bee4c916b9107e308366f1cf4 (patch)
tree6c15034ff89ded6dbc680f349280a5eba8754d19 /arch
parentf0c639348c47d456bff4b424584f4b880baf8042 (diff)
drivers/scsi/ses.c: eliminate double free
commit 9b3a6549b2602ca30f58715a0071e29f9898cae9 upstream. The few lines below the kfree of hdr_buf may go to the label err_free which will also free hdr_buf. The most straightforward solution seems to be to just move the kfree of hdr_buf after these gotos. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier E; expression E1; iterator I; statement S; @@ *kfree(E); ... when != E = E1 when != I(E,...) S when != &E *kfree(E); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions