dtcm: Coverity 174711
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 20:52:19 +0000 (21:52 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 20:52:19 +0000 (21:52 +0100)
cde/programs/dtcm/server/cmscalendar.c

index 8858732c1e849793423582b8731803f1c7db3d2a..8daeb5394d8c7ff620386ffadb573230baefa6dd 100644 (file)
@@ -1130,10 +1130,13 @@ _GetAccessList(_DtCmsCalendar *cal, int index, cms_attribute *attr)
                        tmpattr.value = &tmpval;
                        tmpval.type = CSA_VALUE_ACCESS_LIST;
 
+                       free(alist);
                        return (_DtCm_copy_cms_attribute(attr, &tmpattr,
                                B_TRUE));
-               } else
+               } else {
+                       free(alist);
                        return (stat);
+               }
        }
 }