c->quotes_used = 0;
}
+/**
+ * color_list_free - Free the list of curses colours
+ * @param ptr Colours
+ */
+static void color_list_free(struct ColorList **ptr)
+{
+ if (!ptr || !*ptr)
+ return;
+
+ struct ColorList *cl = *ptr;
+ struct ColorList *next = NULL;
+
+ while (cl)
+ {
+ next = cl->next;
+ FREE(&cl);
+ cl = next;
+ }
+ *ptr = NULL;
+}
+
/**
* color_line_new - Create a new ColorLine
* @retval ptr Newly allocated ColorLine
{
defs_clear(c);
quotes_clear(c);
+
+ color_list_free(&c->user_colors);
}
/**
color_line_list_clear(&Colors->index_tag_list);
color_line_list_clear(&Colors->status_list);
- struct ColorList *cl = Colors->user_colors;
- struct ColorList *next = NULL;
- while (cl)
- {
- next = cl->next;
- FREE(&cl);
- cl = next;
- }
- Colors->user_colors = NULL;
colors_clear(Colors);
defs_free(Colors);
quotes_free(Colors);