coccinelle: make use of the "type" FREE_AND_NULL() rule
[gitweb.git] / sequencer.c
index 5282fb849c5c27e98bbe1b506340c906aa37995c..070b42f240474dfb03f85ea1bb5b1a21c464400a 100644 (file)
@@ -1211,8 +1211,7 @@ struct todo_list {
 static void todo_list_release(struct todo_list *todo_list)
 {
        strbuf_release(&todo_list->buf);
-       free(todo_list->items);
-       todo_list->items = NULL;
+       FREE_AND_NULL(todo_list->items);
        todo_list->nr = todo_list->alloc = 0;
 }