git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inspect: Fix some small memory leaks in Windows inspection.
[libguestfs.git]
/
src
/
inspect.c
diff --git
a/src/inspect.c
b/src/inspect.c
index
be98b0d
..
16baf0b
100644
(file)
--- a/
src/inspect.c
+++ b/
src/inspect.c
@@
-1689,6
+1689,7
@@
check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs)
if (STRCASEEQLEN (key, "\\DosDevices\\", 12) &&
c_isalpha (key[12]) && key[13] == ':')
count++;
if (STRCASEEQLEN (key, "\\DosDevices\\", 12) &&
c_isalpha (key[12]) && key[13] == ':')
count++;
+ free (key);
}
fs->drive_mappings = calloc (2*count + 1, sizeof (char *));
}
fs->drive_mappings = calloc (2*count + 1, sizeof (char *));
@@
-1721,6
+1722,7
@@
check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs)
}
free (blob);
}
}
free (blob);
}
+ free (key);
}
/* Get the hostname. */
}
/* Get the hostname. */
@@
-1738,6
+1740,7
@@
check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs)
goto out;
}
goto out;
}
+ free (values);
values = hivex_node_values (h, node);
for (i = 0; values[i] != 0; ++i) {
values = hivex_node_values (h, node);
for (i = 0; values[i] != 0; ++i) {