Skip to contentSkip to conversation

dm crypt: missing kfree in ctr error path

PATCH In review Alasdair G Kergon 1 participant 1 message Oct 12, 2007 Device mapper

lore
Share & tools
lore

Alasdair G Kergon

author maintainer
#0 lore raw

PATCH 4/25 dm crypt: missing kfree in ctr error path

From: Dmitry Monakhov <[email protected]>

Insert missing kfree() in crypt_iv_essiv_ctr() error path.

---
 drivers/md/dm-crypt.c |    1 +
 1 files changed, 1 insertion(+)
drivers/md/dm-crypt.c +1 -0
Index: linux-2.6.23/drivers/md/dm-crypt.c
===================================================================
@@ -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;
 	}