mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-05 16:51:42 +00:00
Fix wrong pointer check in git__strdup
Signed-off-by: Vicent Marti <tanoku@gmail.com>
This commit is contained in:
parent
c3dd69a9e1
commit
69a09b7c69
@ -22,7 +22,7 @@ void *git__calloc(size_t a, size_t b)
|
||||
char *git__strdup(const char *s)
|
||||
{
|
||||
char *r = strdup(s);
|
||||
if (!s)
|
||||
if (!r)
|
||||
return git_ptr_error(GIT_ENOMEM);
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user