[PATCH] drivers/md/dm-crypt.c: potential memleak fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

	This patch fixes a potential memleak on error path in dm-crypt code.

Signed-off-by: Mariusz Kozlowski <[email protected]>

 drivers/md/dm-crypt.c | 26204 -> 26219 (+15 bytes)
 drivers/md/dm-crypt.o | 142872 -> 142872 (0 bytes)

 drivers/md/dm-crypt.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-2.6.23-rc2-mm2-a/drivers/md/dm-crypt.c	2007-08-10 12:46:08.000000000 +0200
+++ linux-2.6.23-rc2-mm2-b/drivers/md/dm-crypt.c	2007-08-12 09:10:22.000000000 +0200
@@ -175,6 +175,7 @@ static int crypt_iv_essiv_ctr(struct cry

 	if (err) {
 		ti->error = "Error calculating hash in ESSIV";
+		kfree(salt);
 		return err;
 	}

-
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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux