[Pkg-libvirt-commits] [libguestfs] 43/266: p2v: close the mexp handle if mexp_spawnv fails
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 3 14:41:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag debian/1%1.27.35-1
in repository libguestfs.
commit 08bfd9e41b08aed72fa2de1df71e166b8204c958
Author: Pino Toscano <ptoscano at redhat.com>
Date: Fri Jul 25 17:36:17 2014 +0200
p2v: close the mexp handle if mexp_spawnv fails
---
p2v/miniexpect.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/p2v/miniexpect.c b/p2v/miniexpect.c
index 1baab5f..e1a184c 100644
--- a/p2v/miniexpect.c
+++ b/p2v/miniexpect.c
@@ -130,7 +130,7 @@ mexp_spawnl (const char *file, const char *arg, ...)
mexp_h *
mexp_spawnv (const char *file, char **argv)
{
- mexp_h *h;
+ mexp_h *h = NULL;
int fd = -1;
int err;
char slave[1024];
@@ -206,6 +206,8 @@ mexp_spawnv (const char *file, char **argv)
close (fd);
if (pid > 0)
waitpid (pid, NULL, 0);
+ if (h != NULL)
+ mexp_close (h);
errno = err;
return NULL;
}
--
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