examples: Check return value from guestfs_list_filesystems.

Found by Coverity.
This commit is contained in:
Richard W.M. Jones
2014-03-26 20:25:05 +00:00
parent 7792278e05
commit 4099880643

View File

@@ -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",