From: Julia Lawall Date: Thu, 10 Dec 2009 23:51:52 +0000 (+0000) Subject: dm exception store: free tmp_store on persistent flag error X-Git-Tag: firefly_0821_release~11625^2~536 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5db89cf4ea748e1c2d29d52175b2bace466078c7;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Alasdair G Kergon Signed-off-by: Greg Kroah-Hartman --- 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) {