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

[dm-devel] [PATCH 1/21] kpartx: fix crash during boot



kpartx will crash during boot as device-mapper insists on freeing
all passed memory upon exit. So we don't have to do it.

Signed-off-by: Hannes Reinecke <hare suse de>
---
 kpartx/devmapper.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/kpartx/devmapper.c b/kpartx/devmapper.c
index 5b27487..4b228ed 100644
--- a/kpartx/devmapper.c
+++ b/kpartx/devmapper.c
@@ -95,19 +95,16 @@ dm_addmap (int task, const char *name, c
 		}
 		sprintf(prefixed_uuid, UUID_PREFIX "%s", part, uuid);
 		if (!dm_task_set_uuid(dmt, prefixed_uuid))
-			goto freeout;
+			goto addout;
 	}
 
 	dm_task_no_open_count(dmt);
 
 	r = dm_task_run (dmt);
 
-	freeout:
-	if (prefixed_uuid)
-		free(prefixed_uuid);
-
 	addout:
 	dm_task_destroy (dmt);
+
 	return r;
 }
 
-- 
1.4.3.4


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