Use xmemdupz() in many places.
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
39bd2eb56a
commit
182af8343c
@ -393,9 +393,7 @@ static int git_proxy_command_options(const char *var, const char *value)
|
||||
if (matchlen == 4 &&
|
||||
!memcmp(value, "none", 4))
|
||||
matchlen = 0;
|
||||
git_proxy_command = xmalloc(matchlen + 1);
|
||||
memcpy(git_proxy_command, value, matchlen);
|
||||
git_proxy_command[matchlen] = 0;
|
||||
git_proxy_command = xmemdupz(value, matchlen);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user