return;
strbuf_getline(&buf, f, '\n');
+ fclose(f);
strbuf_trim(&buf);
if (!buf.len) {
strbuf_release(&buf);
static void unmark_and_free(struct commit_list *list, unsigned int mark)
{
while (list) {
- struct commit_list *temp = list;
- temp->item->object.flags &= ~mark;
- list = temp->next;
- free(temp);
+ struct commit *commit = pop_commit(&list);
+ commit->object.flags &= ~mark;
}
}