Skip to content

Commit

Permalink
dm exception store: free tmp_store on persistent flag error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Alasdair G Kergon committed Dec 10, 2009
1 parent 6076905 commit 613978f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/md/dm-exception-store.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 613978f

Please sign in to comment.