[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [patch] memory leak dm-exception-store.c



Without this change we would leak tmp_store.

Signed-off-by: Dan Carpenter <error27 gmail com>

--- orig/drivers/md/dm-exception-store.c	2009-11-28 07:17:35.000000000 +0200
+++ devel/drivers/md/dm-exception-store.c	2009-11-28 07:23:04.000000000 +0200
@@ -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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]