Here, n will be 0 and therefore commits will be xmalloc(0), right?
And here, commits will never be realloc()ed.
If merge_bases_many took a commit_list (yes, as I suggested to Junio),
this transformation would not be necessary.
IIRC nothing in merge_bases_many() needed a commit array.
Oh, and whose responsibility is it to free "in"? Caller or callee?
(Because it is a non-const parameter, I would have expected the callee,
but I think it makes more sense if the caller can do whatever she wants
with the heads after calling octopus_merge_bases()).
Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html