summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libspectre/ps.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libspectre/ps.c b/libspectre/ps.c
index cd27694..57a99a3 100644
--- a/libspectre/ps.c
+++ b/libspectre/ps.c
@@ -600,6 +600,7 @@ psscan(FILE *file, const char *filename, int scanstyle)
} else if (doc->nummedia == NONE &&
iscomment(line+2, "DocumentMedia:")) {
char w[21], h[21];
+ PS_free(doc->media);
doc->media = (Media) PS_calloc(1, sizeof (MediaStruct));
CHECK_MALLOCED(doc->media);
doc->media[0].name = ps_gettext(line+length("%%DocumentMedia:"),