dtcm: Coverity 88871
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 15:35:47 +0000 (16:35 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 15:35:47 +0000 (16:35 +0100)
cde/programs/dtcm/server/lookup.c

index 0ac58d102826b6689e8a12cbd511d5e09e4e3991..e27549e8ad26c9296e506474d2323af6ddafee48 100644 (file)
@@ -372,9 +372,10 @@ _DtCmsGetEntryAttrByKey(
                else
                        stat = CSA_E_NO_AUTHORITY;
 
-               if (entry_r)
+               if (entry_r) {
+                       free(res);
                        return (stat);
-               else {
+               else {
                        res->stat = stat;
                        *res_r = res;
                        return (CSA_SUCCESS);