summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-12-10 23:51:52 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-18 14:04:59 -0800
commit5db89cf4ea748e1c2d29d52175b2bace466078c7 (patch)
tree656fe510746378fe5e9bdf5b6203c3a8368e453b /drivers/md
parent1e75ccef288b75a3b207c1b1be4baf5ae5ac0ffb (diff)
dm exception store: free tmp_store on persistent flag error
commit 613978f8711c7fd4d0aa856872375d2abd7c92ff upstream. Error handling code following a kmalloc should free the allocated data. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-exception-store.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c
index 7dbe652efb5a..205215968ff1 100644
--- a/drivers/md/dm-exception-store.c
+++ b/drivers/md/dm-exception-store.c
@@ -216,7 +216,8 @@ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv,
type = get_type("N");
else {
ti->error = "Persistent flag is not P or N";
- return -EINVAL;
+ r = -EINVAL;
+ goto bad_type;
}
if (!type) {