summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index eda4a4e11..debf526d2 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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;
}