From 61a6f7e2d009f97d8896fa4646e0e951824cb392 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 6 Mar 2017 10:59:00 +0100 Subject: [PATCH] tail: check the return value pf guestfs_set_pgroup It is done when creating the handle, so do it also when duplicating the handle. --- cat/tail.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cat/tail.c b/cat/tail.c index 51da5fc52..ef5bbb159 100644 --- a/cat/tail.c +++ b/cat/tail.c @@ -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;