projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
027d50f
)
dm crypt: drop device ref in ctr error path
author
Dmitry Monakhov
<
[email protected]
>
Fri, 19 Oct 2007 21:38:37 +0000
(22:38 +0100)
committer
Alasdair G Kergon
<
[email protected]
>
Sat, 20 Oct 2007 01:00:59 +0000
(
02:00
+0100)
Add a missing 'dm_put_device' in an error path in crypt target constructor.
Signed-off-by: Dmitry Monakhov <
[email protected]
>
Signed-off-by: Milan Broz <
[email protected]
>
Signed-off-by: Alasdair G Kergon <
[email protected]
>
drivers/md/dm-crypt.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-crypt.c
b/drivers/md/dm-crypt.c
index 64fee90bb68b92f5ac897c9ebe3fff3f0e578880..ecd9ef0418cd6e95925bef7c7a86e8dceddae78e 100644
(file)
--- a/
drivers/md/dm-crypt.c
+++ b/
drivers/md/dm-crypt.c
@@
-861,7
+861,7
@@
static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
cc->iv_mode = kmalloc(strlen(ivmode) + 1, GFP_KERNEL);
if (!cc->iv_mode) {
ti->error = "Error kmallocing iv_mode string";
- goto bad
5
;
+ goto bad
_iv_mode
;
}
strcpy(cc->iv_mode, ivmode);
} else
@@
-870,6
+870,8
@@
static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
ti->private = cc;
return 0;
+bad_iv_mode:
+ dm_put_device(ti, cc->dev);
bad5:
bioset_free(cc->bs);
bad_bs: