summaryrefslogtreecommitdiff
path: root/src/vector.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vector.c')
-rw-r--r--src/vector.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vector.c b/src/vector.c
index 27eafebc8..93d09bb5b 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -46,8 +46,7 @@ int git_vector_dup(git_vector *v, const git_vector *src, git_vector_cmp cmp)
assert(v && src);
- GITERR_CHECK_ALLOC_MULTIPLY(src->length, sizeof(void *));
- bytes = src->length * sizeof(void *);
+ GITERR_CHECK_ALLOC_MULTIPLY(&bytes, src->length, sizeof(void *));
v->_alloc_size = src->length;
v->_cmp = cmp ? cmp : src->_cmp;