[Pkg-libvirt-commits] [libguestfs] 140/156: drives: fix deletion of servers on error
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:26:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch master
in repository libguestfs.
commit 67b585c3362c94f49d54e47e58d2a7f593ae5430
Author: Pino Toscano <ptoscano at redhat.com>
Date: Mon Aug 18 14:56:08 2014 +0200
drives: fix deletion of servers on error
Make sure to not skip any of the created server, and to always free
the "server" array.
(cherry picked from commit b53286a6432b8b381769cd8e8a0c235ce13d58cf)
---
src/drives.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/drives.c b/src/drives.c
index 4bd8328..85c1495 100644
--- a/src/drives.c
+++ b/src/drives.c
@@ -743,8 +743,7 @@ parse_servers (guestfs_h *g, char *const *strs,
for (i = 0; i < n; ++i) {
if (parse_one_server (g, strs[i], &servers[i]) == -1) {
- if (i > 0)
- free_drive_servers (servers, i-1);
+ free_drive_servers (servers, i);
return -1;
}
}
--
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