summaryrefslogtreecommitdiff
path: root/gs/src/zfontenum.c
diff options
context:
space:
mode:
Diffstat (limited to 'gs/src/zfontenum.c')
-rw-r--r--gs/src/zfontenum.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/gs/src/zfontenum.c b/gs/src/zfontenum.c
index 13a2162ce..fed804f2e 100644
--- a/gs/src/zfontenum.c
+++ b/gs/src/zfontenum.c
@@ -63,7 +63,7 @@ z_fontenum(i_ctx_t *i_ctx_p)
return code;
}
- r = results = gs_malloc(1, sizeof(fontenum_t), "fontenum list");
+ r = results = gs_malloc(imemory->non_gc_memory, 1, sizeof(fontenum_t), "fontenum list");
elements = 0;
while((code = gp_enumerate_fonts_next(enum_state, &fontname, &path )) > 0) {
if (fontname == NULL || path == NULL) {
@@ -72,14 +72,14 @@ z_fontenum(i_ctx_t *i_ctx_p)
}
length = strlen(fontname) + 1;
- r->fontname = gs_malloc(length, 1, "native font name");
+ r->fontname = gs_malloc(imemory->non_gc_memory, length, 1, "native font name");
memcpy(r->fontname, fontname, length);
length = strlen(path) + 1;
- r->path = gs_malloc(length, 1, "native font path");
+ r->path = gs_malloc(imemory->non_gc_memory, length, 1, "native font path");
memcpy(r->path, path, length);
- r->next = gs_malloc(1, sizeof(fontenum_t), "fontenum list");
+ r->next = gs_malloc(imemory->non_gc_memory, 1, sizeof(fontenum_t), "fontenum list");
r = r->next;
elements += 1;
}
@@ -112,9 +112,12 @@ z_fontenum(i_ctx_t *i_ctx_p)
results = r;
r = r->next;
- gs_free(results->fontname, strlen(results->fontname) + 1, 1, "native font name");
- gs_free(results->path, strlen(results->path) + 1, 1, "native font path");
- gs_free(results, 1, sizeof(fontenum_t), "fontenum list");
+ gs_free(imemory->non_gc_memory,
+ results->fontname, strlen(results->fontname) + 1, 1, "native font name");
+ gs_free(imemory->non_gc_memory,
+ results->path, strlen(results->path) + 1, 1, "native font path");
+ gs_free(imemory->non_gc_memory,
+ results, 1, sizeof(fontenum_t), "fontenum list");
}
push(2);