From 11d9f6b30438a141def883b0115f7f764c03e990 Mon Sep 17 00:00:00 2001 From: Philip Kelley Date: Sun, 27 Jan 2013 14:17:07 -0500 Subject: Vector improvements and their fallout --- src/commit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/commit.c') 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; -- cgit v1.2.1