summaryrefslogtreecommitdiff
path: root/gfx/cro.c
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/cro.c')
-rw-r--r--gfx/cro.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gfx/cro.c b/gfx/cro.c
index 21cbda3..91e0ed4 100644
--- a/gfx/cro.c
+++ b/gfx/cro.c
@@ -404,9 +404,7 @@ static void cr_pdf_new_sheet(void *ctx)
struct cro_ctx *cc = ctx;
cc->n_sheets++;
- cc->sheets = realloc(cc->sheets, sizeof(struct record) * cc->n_sheets);
- if (!cc->sheets)
- diag_pfatal("realloc");
+ cc->sheets = realloc_type_n(cc->sheets, struct record, cc->n_sheets);
cc->sheets[cc->n_sheets - 1] = cc->record;
record_wipe(&cc->record);
}