From 0fa768b653b61c2ff2639c17927a488a8e1b5877 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 13 Jul 2018 17:55:59 +0100 Subject: [PATCH] dtcm: Coverity 88505 --- cde/programs/dtcm/server/rtable2.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cde/programs/dtcm/server/rtable2.c b/cde/programs/dtcm/server/rtable2.c index 05cb0eb4..5a25b3ad 100644 --- a/cde/programs/dtcm/server/rtable2.c +++ b/cde/programs/dtcm/server/rtable2.c @@ -379,11 +379,14 @@ _DtCm_rtable_set_access_2_svc(Access_Args_2 *args, struct svc_req *svcrq) Access_Status_4 *newstat; newargs = _DtCm_accargs2_to_accargs4(args); - newstat = _DtCm_rtable_set_access_4_svc(newargs, svcrq); - - stat = _DtCm_accstat4_to_accstat2(*newstat); - - if (newargs!=NULL) xdr_free((xdrproc_t)_DtCm_xdr_Access_Args_4, (char*)newargs); + if(newargs) { + newstat = _DtCm_rtable_set_access_4_svc(newargs, svcrq); + + stat = _DtCm_accstat4_to_accstat2(*newstat); + + xdr_free((xdrproc_t)_DtCm_xdr_Access_Args_4, (char*)newargs); + } + return(&stat); } -- 2.25.1