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

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

 



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@xxxxxxx>
---
 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

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux