]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dm exception store: free tmp_store on persistent flag error
authorJulia Lawall <julia@diku.dk>
Thu, 10 Dec 2009 23:51:52 +0000 (23:51 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:04:59 +0000 (14:04 -0800)
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>
drivers/md/dm-exception-store.c

index 7dbe652efb5aabe8b42bbae0847ab9d062197495..205215968ff119e40890d26ed9f62422ab96dd5f 100644 (file)
@@ -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) {