diff options
author | Russell Belfer <rb@github.com> | 2013-01-29 13:54:08 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-01-29 13:54:08 -0800 |
commit | 4657fc1cab3943ae82e3c0a4d93c4b1ef222ce11 (patch) | |
tree | 97aa15b9e8fbdd0f347babd2e9f534918228176c /src/commit.c | |
parent | 764b9e71469f9edc0839c2cf4207ed7ab4a222ce (diff) | |
parent | 590365db54e7f0311bd77d09270c7c3714a33b3c (diff) | |
download | libgit2-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.c | 3 |
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; |