mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
builtin-apply.c: fix a tiny leak introduced during xmemdupz() conversion.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
182af8343c
commit
ca0328354a
|
@ -291,6 +291,7 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
|
|||
int deflen = strlen(def);
|
||||
if (deflen < len && !strncmp(start, def, deflen))
|
||||
return def;
|
||||
free(def);
|
||||
}
|
||||
|
||||
return xmemdupz(start, len);
|
||||
|
|
Loading…
Reference in a new issue