lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 22 Feb 2010 18:40:11 +0200 From: niam <niam.niam@...il.com> To: David Woodhouse <dwmw2@...radead.org>, Joe Perches <joe@...ches.com>, Joakim Tjernlund <Joakim.Tjernlund@...nsmode.se>, linux-mtd@...ts.infradead.org Cc: linux-kernel@...r.kernel.org Subject: [PATCH] jffs2: fix memory leak if the sector was successfully erased Resending patch to proper people/mailing list. Memory allocated for erase instruction is not freed if the sector was successfully erased. Signed-off-by: Dmytro Milinevskyy <niam.niam@...il.com> --- fs/jffs2/erase.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c index b47679b..c0a5604 100644 --- a/fs/jffs2/erase.c +++ b/fs/jffs2/erase.c @@ -74,8 +74,10 @@ static void jffs2_erase_block(struct jffs2_sb_info *c, ((struct erase_priv_struct *)instr->priv)->c = c; ret = c->mtd->erase(c->mtd, instr); - if (!ret) + if (!ret) { + kfree(instr); return; + } bad_offset = instr->fail_addr; kfree(instr); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists