diff --git a/repmgr.c b/repmgr.c index 9005aa5c..72f0975c 100644 --- a/repmgr.c +++ b/repmgr.c @@ -6875,7 +6875,10 @@ local_command(const char *command, PQExpBufferData *outputbuf) pclose(fp); - log_verbose(LOG_DEBUG, "local_command(): output returned was:\n%s", outputbuf->data); + if (outputbuf->data != NULL) + log_verbose(LOG_DEBUG, "local_command(): output returned was:\n%s", outputbuf->data); + else + log_verbose(LOG_DEBUG, "local_command(): no output returned\n"); return true; }