X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=daemon%2Fmount.c;h=128b05b066330e2b4441be26a5f663ff03a3812f;hb=9729402e7524964f216c6232ebc4e2e3eaa03886;hp=ccace75e5b53cf43f865678ff76ceff5bd636c24;hpb=821083b1c46005cfeebf384e81be812f6b0cc74b;p=libguestfs.git diff --git a/daemon/mount.c b/daemon/mount.c index ccace75..128b05b 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -79,6 +79,7 @@ do_mount_vfs (const char *options, const char *vfstype, if (is_root) root_mounted = 1; + free (error); return 0; } @@ -349,7 +350,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; @@ -364,6 +365,7 @@ do_mount_loop (const char *file, const char *mountpoint) return -1; } + free (error); return 0; }