diff options
author | Julia Lawall <julia@diku.dk> | 2009-12-10 18:51:52 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-12-10 18:51:52 -0500 |
commit | 613978f8711c7fd4d0aa856872375d2abd7c92ff (patch) | |
tree | d921894bb5329ac92f8b598e30481a3b058fea4d /drivers/md/dm-exception-store.c | |
parent | 6076905b5ef39e0ea58db32583c9e0036c05e47b (diff) |
dm exception store: free tmp_store on persistent flag error
Error handling code following a kmalloc should free the allocated data.
Cc: stable@kernel.org
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-exception-store.c')
-rw-r--r-- | drivers/md/dm-exception-store.c | 3 |
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, | |||
216 | type = get_type("N"); | 216 | type = get_type("N"); |
217 | else { | 217 | else { |
218 | ti->error = "Persistent flag is not P or N"; | 218 | ti->error = "Persistent flag is not P or N"; |
219 | return -EINVAL; | 219 | r = -EINVAL; |
220 | goto bad_type; | ||
220 | } | 221 | } |
221 | 222 | ||
222 | if (!type) { | 223 | if (!type) { |