From c4940d8f787d0b09485b3a6e060ddb7ce8ef8518 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 13 Jul 2018 18:42:56 +0100 Subject: [PATCH] dtcm: Coverity 89517 --- cde/programs/dtcm/server/rtable3.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cde/programs/dtcm/server/rtable3.c b/cde/programs/dtcm/server/rtable3.c index 50079fcc..faecb2ae 100644 --- a/cde/programs/dtcm/server/rtable3.c +++ b/cde/programs/dtcm/server/rtable3.c @@ -357,11 +357,13 @@ _DtCm_register_callback_3_svc(Registration_3 *r, struct svc_req *svcrq) stat = 0; - newreg = _DtCm_reg3_to_reg4(r); - newstat = _DtCm_register_callback_4_svc(newreg, svcrq); - stat = _DtCm_regstat4_to_regstat3(*newstat); + newreg = _DtCm_reg3_to_reg4(r); + if(newreg) { + newstat = _DtCm_register_callback_4_svc(newreg, svcrq); + stat = _DtCm_regstat4_to_regstat3(*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