From c68559ee49af4a3437be08687abb54f5233880fc Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 13 Jul 2018 17:49:06 +0100 Subject: [PATCH] dtcm: Coverity 88225 --- cde/programs/dtcm/server/rtable2.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cde/programs/dtcm/server/rtable2.c b/cde/programs/dtcm/server/rtable2.c index 340ab794..0817c4c6 100644 --- a/cde/programs/dtcm/server/rtable2.c +++ b/cde/programs/dtcm/server/rtable2.c @@ -354,11 +354,13 @@ _DtCm_deregister_callback_2_svc(Registration_2 *r, struct svc_req *svcrq) Registration_Status_4 *newstat; newreg = _DtCm_reg2_to_reg4(r); - newstat = _DtCm_deregister_callback_4_svc(newreg, svcrq); + if(newreg) { + newstat = _DtCm_deregister_callback_4_svc(newreg, svcrq); - stat = _DtCm_regstat4_to_regstat2(*newstat); + stat = _DtCm_regstat4_to_regstat2(*newstat); - if (newreg!=NULL) xdr_free((xdrproc_t)_DtCm_xdr_Registration_4, (char*)newreg); + xdr_free((xdrproc_t)_DtCm_xdr_Registration_4, (char*)newreg); + } return(&stat); } -- 2.25.1