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

Dan Carpenter error27 at gmail.com
Sat Nov 28 10:31:13 UTC 2009


Without this change we would leak tmp_store.

Signed-off-by: Dan Carpenter <error27 at 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) {




More information about the dm-devel mailing list