diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-11-19 17:17:46 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2010-11-19 17:17:46 +0200 |
| commit | 69a09b7c6972343e321c7c0e3441fcc4b5340444 (patch) | |
| tree | c77fc841dc70e881e9912c4841430b7b3b10c90b /src/util.c | |
| parent | c3dd69a9e11f2c48a040d0ecaff40295d4759dd5 (diff) | |
| download | libgit2-69a09b7c6972343e321c7c0e3441fcc4b5340444.tar.gz | |
Fix wrong pointer check in git__strdup
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/util.c')
| -rw-r--r-- | src/util.c | 2 |
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; } |
