diff options
Diffstat (limited to 'negotiator/skipping.c')
-rw-r--r-- | negotiator/skipping.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/negotiator/skipping.c b/negotiator/skipping.c index f109928ad0..abedb70a48 100644 --- a/negotiator/skipping.c +++ b/negotiator/skipping.c @@ -75,7 +75,7 @@ static struct entry *rev_list_push(struct data *data, struct commit *commit, int return entry; } -static int clear_marks(const char *refname, const struct object_id *oid, +static int clear_marks(const char *refname, const char *referent UNUSED, const struct object_id *oid, int flag UNUSED, void *cb_data UNUSED) { @@ -239,7 +239,7 @@ static int ack(struct fetch_negotiator *n, struct commit *c) { int known_to_be_common = !!(c->object.flags & COMMON); if (!(c->object.flags & SEEN)) - die("received ack for commit %s not sent as 'have'\n", + die("received ack for commit %s not sent as 'have'", oid_to_hex(&c->object.oid)); mark_common(n->data, c); return known_to_be_common; @@ -247,8 +247,11 @@ static int ack(struct fetch_negotiator *n, struct commit *c) static void release(struct fetch_negotiator *n) { - clear_prio_queue(&((struct data *)n->data)->rev_list); - FREE_AND_NULL(n->data); + struct data *data = n->data; + for (int i = 0; i < data->rev_list.nr; i++) + free(data->rev_list.array[i].data); + clear_prio_queue(&data->rev_list); + FREE_AND_NULL(data); } void skipping_negotiator_init(struct fetch_negotiator *negotiator) |