[099/151] dm exception store: free tmp_store on persistent flag error

From: Greg KH
Date: Wed Dec 16 2009 - 23:21:51 EST


2.6.32-stable review patch. If anyone has any objections, please let us know.

------------------

From: Julia Lawall <julia@xxxxxxx>

commit 613978f8711c7fd4d0aa856872375d2abd7c92ff upstream.

Error handling code following a kmalloc should free the allocated data.

Signed-off-by: Julia Lawall <julia@xxxxxxx>
Signed-off-by: Alasdair G Kergon <agk@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/md/dm-exception-store.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

--- 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_
type = get_type("N");
else {
ti->error = "Persistent flag is not P or N";
- return -EINVAL;
+ r = -EINVAL;
+ goto bad_type;
}

if (!type) {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/