>From 96b13f7f064d4044038487b4a5c1f50038d9c91f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 6 Feb 2016 09:51:42 +0000 Subject: [PATCH 1/4] inspection: Only convert registry blob to GUID once. Updates commit d3b1387bdd118762606d6b589b9e2e67ae582d3b. --- src/inspect-fs-windows.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/inspect-fs-windows.c b/src/inspect-fs-windows.c index 1698e81..9aa9847 100644 --- a/src/inspect-fs-windows.c +++ b/src/inspect-fs-windows.c @@ -623,6 +623,7 @@ static char * map_registry_disk_blob_gpt (guestfs_h *g, const void *blob) { CLEANUP_FREE_STRING_LIST char **parts = NULL; + CLEANUP_FREE char *blob_guid = extract_guid_from_registry_blob (g, blob); size_t i; parts = guestfs_list_partitions (g); @@ -632,7 +633,6 @@ map_registry_disk_blob_gpt (guestfs_h *g, const void *blob) for (i = 0; parts[i] != NULL; i += 2) { CLEANUP_FREE char *fs_guid = NULL; - CLEANUP_FREE char *blob_guid = NULL; int partnum; CLEANUP_FREE char *device = NULL; CLEANUP_FREE char *type = NULL; @@ -661,9 +661,6 @@ map_registry_disk_blob_gpt (guestfs_h *g, const void *blob) if (fs_guid == NULL) continue; - /* extract the GUID from the Windows registry blob */ - blob_guid = extract_guid_from_registry_blob (g, blob); - /* if both GUIDs match, we have found mapping for out device */ if (STRCASEEQ (fs_guid, blob_guid)) return safe_strdup (g, parts[i]); -- 2.5.0