dtcm: Coverity 88584
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 17:15:49 +0000 (18:15 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 17:15:49 +0000 (18:15 +0100)
cde/programs/dtcm/server/cmsfunc.c

index 79f02e55508da4d70326ce0874bdf32255ccd7ce..86dc10f057df8d29497f2121fa9af53256d39f78 100644 (file)
@@ -473,7 +473,7 @@ cms_set_calendar_attr_5_svc(cms_set_cal_attr_args *args, struct svc_req *svcrq)
                }
        } else {
                int             i;
-               Access_Entry_4  *v4list;
+               Access_Entry_4  *v4list = NULL;
 
                /* for old format file, the only settable calendar attribute
                 * is access list
@@ -490,7 +490,10 @@ cms_set_calendar_attr_5_svc(cms_set_cal_attr_args *args, struct svc_req *svcrq)
                        if ((res = _DtCmsCmsAccessToV4Access(
                            args->attrs[i].value->item.access_list_value,
                            &v4list)) == CSA_SUCCESS)
+                       {
                                res = _DtCmsSetV4AccessListAndLog(cal, v4list);
+                       }
+                       free(v4list);
                }
 
                if (res != CSA_SUCCESS)