pack-objects: fix memory leak in compute_write_order
diff --git a/src/pack-objects.c b/src/pack-objects.c
index fd181fc..3046d94 100644
--- a/src/pack-objects.c
+++ b/src/pack-objects.c
@@ -605,6 +605,7 @@ static git_pobject **compute_write_order(git_packbuilder *pb)
}
if (wo_end != pb->nr_objects) {
+ git__free(wo);
giterr_set(GITERR_INVALID, "invalid write order");
return NULL;
}