Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16524
b: refs/heads/master
c: 9d3520a
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Rompf authored and Linus Torvalds committed Jan 6, 2006
1 parent bf86490 commit 33dfcf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b56306e56784d0513e1193d58c05a6bd97bd1a9
refs/heads/master: 9d3520a339d62f942085e9888f66905eb8b350bd
5 changes: 5 additions & 0 deletions trunk/drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
bad2:
crypto_free_tfm(tfm);
bad1:
/* Must zero key material before freeing */
memset(cc, 0, sizeof(*cc) + cc->key_size * sizeof(u8));
kfree(cc);
return -EINVAL;
}
Expand All @@ -706,6 +708,9 @@ static void crypt_dtr(struct dm_target *ti)
cc->iv_gen_ops->dtr(cc);
crypto_free_tfm(cc->tfm);
dm_put_device(ti, cc->dev);

/* Must zero key material before freeing */
memset(cc, 0, sizeof(*cc) + cc->key_size * sizeof(u8));
kfree(cc);
}

Expand Down

0 comments on commit 33dfcf0

Please sign in to comment.