summaryrefslogtreecommitdiff
path: root/libspectre
diff options
context:
space:
mode:
authorRandy <randy408@protonmail.com>2020-03-10 23:48:10 +0100
committerRandy <randy408@protonmail.com>2020-03-10 23:48:10 +0100
commit945d39259c0ca1dfd6c594a9d3ed971152313190 (patch)
tree6742c049b9956382f23eb9885cd3d994a663b603 /libspectre
parenta6329a26cbc8a920cf56531a762bfbf62b3ddc9d (diff)
fix memory leak in ps.c:650
Diffstat (limited to 'libspectre')
-rw-r--r--libspectre/ps.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libspectre/ps.c b/libspectre/ps.c
index 57a99a3..4fe3b23 100644
--- a/libspectre/ps.c
+++ b/libspectre/ps.c
@@ -647,6 +647,7 @@ psscan(FILE *file, const char *filename, int scanstyle)
} else if (doc->nummedia == NONE &&
iscomment(line+2, "DocumentPaperSizes:")) {
+ PS_free(doc->media);
doc->media = (Media) PS_calloc(1, sizeof (MediaStruct));
CHECK_MALLOCED(doc->media);
doc->media[0].name = ps_gettext(line+length("%%DocumentPaperSizes:"),