git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
daemon: Use pkg-config to locate Augeas CFLAGS / libraries.
[libguestfs.git]
/
align
/
scan.c
diff --git
a/align/scan.c
b/align/scan.c
index
529add5
..
7b4631a
100644
(file)
--- a/
align/scan.c
+++ b/
align/scan.c
@@
-228,9
+228,13
@@
scan (void)
struct guestfs_partition_list *parts;
devices = guestfs_list_devices (g);
struct guestfs_partition_list *parts;
devices = guestfs_list_devices (g);
+ if (devices == NULL)
+ exit (EXIT_FAILURE);
for (i = 0; devices[i] != NULL; ++i) {
parts = guestfs_part_list (g, devices[i]);
for (i = 0; devices[i] != NULL; ++i) {
parts = guestfs_part_list (g, devices[i]);
+ if (parts == NULL)
+ exit (EXIT_FAILURE);
/* Canonicalize the name of the device for printing. */
if (STRPREFIX (devices[i], "/dev/") &&
/* Canonicalize the name of the device for printing. */
if (STRPREFIX (devices[i], "/dev/") &&