dtcm: Coverity 88505
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 16:55:59 +0000 (17:55 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 16:55:59 +0000 (17:55 +0100)
cde/programs/dtcm/server/rtable2.c

index 05cb0eb4b4b280245833ef548c30602ee05dd563..5a25b3adfca935820e6d5298f77135a9da688b7f 100644 (file)
@@ -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);
 }