From 40998806437eb74b60fddff466a8318f76551818 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 26 Mar 2014 20:25:05 +0000 Subject: [PATCH] examples: Check return value from guestfs_list_filesystems. Found by Coverity. --- examples/libvirt-auth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/libvirt-auth.c b/examples/libvirt-auth.c index 2a046e63e..699dd8760 100644 --- a/examples/libvirt-auth.c +++ b/examples/libvirt-auth.c @@ -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",