dtcm: Coverity 88745
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 17:48:31 +0000 (18:48 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 17:48:31 +0000 (18:48 +0100)
cde/programs/dtcm/server/rtable3.c

index 1bfa608fc4477b9106ebe69e3e67e8c7c1343505..3bf6d79fc0d383ddcd19f4e06c05074f4e08936a 100644 (file)
@@ -418,10 +418,12 @@ _DtCm_rtable_get_access_3_svc(Access_Args_3 *args, struct svc_req *svcrq)
        if (res!=NULL) xdr_free((xdrproc_t)_DtCm_xdr_Access_Args_3, (char*)res); res = NULL;
 
         newargs = _DtCm_accargs3_to_accargs4(args);
-        newres = _DtCm_rtable_get_access_4_svc(newargs, svcrq);
-        res = _DtCm_accargs4_to_accargs3(newres);
+        if(newargs) {
+                newres = _DtCm_rtable_get_access_4_svc(newargs, svcrq);
+                res = _DtCm_accargs4_to_accargs3(newres);
 
-        if (newargs!=NULL) xdr_free((xdrproc_t)_DtCm_xdr_Access_Args_4, (char*)newargs); 
+                xdr_free((xdrproc_t)_DtCm_xdr_Access_Args_4, (char*)newargs);
+        }
         return(res); 
 }