diff options
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/upload-pack.c b/upload-pack.c index 89e832b64a..d0bc3ca07a 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -316,10 +316,8 @@ static int reachable(struct commit *want) commit_list_insert_by_date(want, &work); while (work) { - struct commit_list *list = work->next; - struct commit *commit = work->item; - free(work); - work = list; + struct commit_list *list; + struct commit *commit = pop_commit(&work); if (commit->object.flags & THEY_HAVE) { want->object.flags |= COMMON_KNOWN; |