[Libguestfs] [PATCH 06/13] Coverity: Check return value of sysroot_path.

Richard W.M. Jones rjones at redhat.com
Thu Jun 9 10:17:05 UTC 2011


For some reason we were checking the parameter!
---
 daemon/mount.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/daemon/mount.c b/daemon/mount.c
index a379d39..098283a 100644
--- a/daemon/mount.c
+++ b/daemon/mount.c
@@ -352,7 +352,7 @@ do_mount_loop (const char *file, const char *mountpoint)
   }
 
   buf = sysroot_path (file);
-  if (!file) {
+  if (!buf) {
     reply_with_perror ("malloc");
     free (mp);
     return -1;
-- 
1.7.5.1




More information about the Libguestfs mailing list