summaryrefslogtreecommitdiff
path: root/fitz/stm_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/stm_open.c')
-rw-r--r--fitz/stm_open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/stm_open.c b/fitz/stm_open.c
index 733b4c6a..dfb4ed8d 100644
--- a/fitz/stm_open.c
+++ b/fitz/stm_open.c
@@ -7,7 +7,7 @@ fz_new_stream(fz_context *ctx, void *state,
{
fz_stream *stm;
- stm = fz_malloc(ctx, sizeof(fz_stream));
+ stm = fz_malloc_struct(ctx, fz_stream);
stm->refs = 1;
stm->error = 0;
@@ -86,7 +86,7 @@ fz_open_fd(fz_context *ctx, int fd)
fz_stream *stm;
int *state;
- state = fz_malloc(ctx, sizeof(int));
+ state = fz_malloc_struct(ctx, int);
*state = fd;
fz_try(ctx)