struct rev_name *name = (struct rev_name *)commit->util;
struct commit_list *parents;
int parent_number = 1;
+ char *to_free = NULL;
parse_commit(commit);
return;
if (deref) {
- tip_name = xstrfmt("%s^0", tip_name);
+ tip_name = to_free = xstrfmt("%s^0", tip_name);
if (generation)
die("generation: %d, but deref?", generation);
name->taggerdate = taggerdate;
name->generation = generation;
name->distance = distance;
- } else
+ } else {
+ free(to_free);
return;
+ }
for (parents = commit->parents;
parents;