summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@hotmail.com>2013-01-27 14:17:07 -0500
committerPhilip Kelley <phkelley@hotmail.com>2013-01-27 14:17:07 -0500
commit11d9f6b30438a141def883b0115f7f764c03e990 (patch)
treeabe54e8085c4e3a1c7a822ee256f81e0d58e6b42 /src/commit.c
parentaa3bf89df21c44f22fe70b4aac9109646fd06b48 (diff)
downloadlibgit2-11d9f6b30438a141def883b0115f7f764c03e990.tar.gz
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;