dtcm: Coverity 89641
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 23:06:59 +0000 (00:06 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 23:06:59 +0000 (00:06 +0100)
cde/programs/dtcm/dtcm/x_graphics.c

index 1125a982025cbf0e9dd8655e44f864196e23f531..61434aabf8fbca13203bf9601ed837af4fa2ff49 100644 (file)
@@ -2973,7 +2973,7 @@ x_print_list_range(Calendar *c, CSA_sint32 appt_type, int item_data,
        time_t          start, end;
         CSA_return_code stat;
         CSA_entry_handle *list;
-        CSA_attribute *range_attrs;
+        CSA_attribute *range_attrs = NULL;
        CSA_enum *ops = NULL;
         int i;
        CSA_uint32 a_total;
@@ -3010,6 +3010,7 @@ x_print_list_range(Calendar *c, CSA_sint32 appt_type, int item_data,
        stat = csa_list_entries(c->cal_handle, i, range_attrs,
                                ops, &a_total, &list, NULL);
        free(ops);
+       free(range_attrs);
        if (stat != CSA_SUCCESS) {
                return;
        }