From 171df20386c4a15d0a06f615a5fd0b0b3ef12b39 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 1 Sep 2016 12:14:36 +0900 Subject: [PATCH] repmgr: avoid (null) in local_command debug output --- repmgr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }