[Pkg-libvirt-commits] [libguestfs] 49/61: examples: Check return value from guestfs_list_filesystems.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Mar 29 14:36:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 40998806437eb74b60fddff466a8318f76551818
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Wed Mar 26 20:25:05 2014 +0000
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 2a046e6..699dd87 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",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list