diff options
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 67b71ea0e8e..5717bedcf17 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -1531,9 +1531,15 @@ rpcsvc_program_unregister (rpcsvc_t *svc, rpcsvc_program_t *program) ret = 0; out: if (ret == -1) { - gf_log (GF_RPCSVC, GF_LOG_ERROR, "Program unregistration failed" - ": %s, Num: %d, Ver: %d, Port: %d", program->progname, - program->prognum, program->progver, program->progport); + if (program) { + gf_log (GF_RPCSVC, GF_LOG_ERROR, "Program " + "unregistration failed" + ": %s, Num: %d, Ver: %d, Port: %d", + program->progname, program->prognum, + program->progver, program->progport); + } else { + gf_log (GF_RPCSVC, GF_LOG_ERROR, "Program not found"); + } } return ret; |