name-rev: use sizeof(*ptr) instead of sizeof(type) in allocation
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e0c4da6f2a
commit
bf43abc6e6
@ -102,7 +102,7 @@ static void name_rev(struct commit *commit,
|
||||
}
|
||||
|
||||
if (name == NULL) {
|
||||
name = xmalloc(sizeof(rev_name));
|
||||
name = xmalloc(sizeof(*name));
|
||||
set_commit_rev_name(commit, name);
|
||||
goto copy_data;
|
||||
} else if (is_better_name(name, taggerdate, distance, from_tag)) {
|
||||
|
Loading…
Reference in New Issue
Block a user