diff options
author | Randy <randy408@protonmail.com> | 2020-03-10 23:48:10 +0100 |
---|---|---|
committer | Randy <randy408@protonmail.com> | 2020-03-10 23:48:10 +0100 |
commit | 945d39259c0ca1dfd6c594a9d3ed971152313190 (patch) | |
tree | 6742c049b9956382f23eb9885cd3d994a663b603 | |
parent | a6329a26cbc8a920cf56531a762bfbf62b3ddc9d (diff) |
fix memory leak in ps.c:650
-rw-r--r-- | libspectre/ps.c | 1 |
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:"), |