diff --git a/src/util/command.c b/src/util/command.c index aa43f76019a4729c8cd987ca97b1d23a917b7e84..38d462b19dbfc50426b4368be1e82db04329427f 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -931,8 +931,8 @@ virCommandRun(virCommandPtr cmd, int *exitstatus) ret = -1; VIR_DEBUG("Result stdout: '%s' stderr: '%s'", - NULLSTR(*cmd->outbuf), - NULLSTR(*cmd->errbuf)); + cmd->outbuf ? NULLSTR(*cmd->outbuf) : "(null)", + cmd->errbuf ? NULLSTR(*cmd->errbuf) : "(null)"); /* Reset any capturing, in case caller runs * this identical command again */