summaryrefslogtreecommitdiff
path: root/fitz/res_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/res_path.c')
-rw-r--r--fitz/res_path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/res_path.c b/fitz/res_path.c
index 0fc1882e..6c5f1802 100644
--- a/fitz/res_path.c
+++ b/fitz/res_path.c
@@ -23,7 +23,7 @@ fz_clonepath(fz_path *old)
path->len = old->len;
path->cap = path->len;
- path->els = fz_malloc(path->cap * sizeof(fz_pathel));
+ path->els = fz_calloc(path->cap, sizeof(fz_pathel));
memcpy(path->els, old->els, sizeof(fz_pathel) * path->len);
return path;
@@ -43,7 +43,7 @@ growpath(fz_path *path, int n)
return;
while (path->len + n > path->cap)
path->cap = path->cap + 36;
- path->els = fz_realloc(path->els, sizeof (fz_pathel) * path->cap);
+ path->els = fz_realloc(path->els, path->cap, sizeof(fz_pathel));
}
void