tail: check the return value pf guestfs_set_pgroup

It is done when creating the handle, so do it also when duplicating the
handle.
This commit is contained in:
Pino Toscano
2017-03-06 10:59:00 +01:00
parent e5474df1ac
commit 61a6f7e2d0

View File

@@ -495,7 +495,10 @@ reopen_handle (void)
guestfs_set_verbose (g2, guestfs_get_verbose (g));
guestfs_set_trace (g2, guestfs_get_trace (g));
guestfs_set_pgroup (g2, guestfs_get_pgroup (g));
if (guestfs_set_pgroup (g2, guestfs_get_pgroup (g)) == -1) {
perror ("guestfs_set_pgroup");
return -1;
}
guestfs_close (g);
g = g2;