vendor/libgit2/src/signature.c in rugged-0.24.0b13 vs vendor/libgit2/src/signature.c in rugged-0.24.0b14
- old
+ new
@@ -77,13 +77,12 @@
p = git__calloc(1, sizeof(git_signature));
GITERR_CHECK_ALLOC(p);
p->name = extract_trimmed(name, strlen(name));
+ GITERR_CHECK_ALLOC(p->name);
p->email = extract_trimmed(email, strlen(email));
-
- if (p->name == NULL || p->email == NULL)
- return -1; /* oom */
+ GITERR_CHECK_ALLOC(p->email);
if (p->name[0] == '\0' || p->email[0] == '\0') {
git_signature_free(p);
return signature_error("Signature cannot have an empty name or email");
}