summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-01-29 13:54:08 -0800
committerRussell Belfer <rb@github.com>2013-01-29 13:54:08 -0800
commit4657fc1cab3943ae82e3c0a4d93c4b1ef222ce11 (patch)
tree97aa15b9e8fbdd0f347babd2e9f534918228176c /src/commit.c
parent764b9e71469f9edc0839c2cf4207ed7ab4a222ce (diff)
parent590365db54e7f0311bd77d09270c7c3714a33b3c (diff)
downloadlibgit2-4657fc1cab3943ae82e3c0a4d93c4b1ef222ce11.tar.gz
Merge pull request #1285 from phkelley/vector
Vector improvements and their fallout
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commit.c b/src/commit.c
index 2714f1acc..29ce39107 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -137,7 +137,8 @@ int git_commit__parse_buffer(git_commit *commit, const void *data, size_t len)
const char *buffer_end = (const char *)data + len;
git_oid parent_id;
- git_vector_init(&commit->parent_ids, 4, NULL);
+ if (git_vector_init(&commit->parent_ids, 4, NULL) < 0)
+ return -1;
if (git_oid__parse(&commit->tree_id, &buffer, buffer_end, "tree ") < 0)
goto bad_buffer;