mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
examples: Check return value from guestfs_list_filesystems.
Found by Coverity.
This commit is contained in:
@@ -82,6 +82,8 @@ main (int argc, char *argv[])
|
||||
exit (EXIT_FAILURE);
|
||||
|
||||
filesystems = guestfs_list_filesystems (g);
|
||||
if (filesystems == NULL)
|
||||
exit (EXIT_FAILURE);
|
||||
|
||||
for (i = 0; filesystems[i] != NULL; i += 2) {
|
||||
printf ("%s:%s is a %s filesystem\n",
|
||||
|
||||
Reference in New Issue
Block a user