diff options
author | Randy <randy408@protonmail.com> | 2020-03-07 10:49:20 +0100 |
---|---|---|
committer | Albert Astals Cid <tsdgeos@yahoo.es> | 2020-03-07 09:54:21 +0000 |
commit | 567f72a04dcc5e883e708bd2a3a149e818c1c12f (patch) | |
tree | 2d9e1dbd9f81da72ef601ef812ec9d70977017bf | |
parent | ebc0c1ef2e36cb50267689cc44338a17d2895725 (diff) |
fix memory leak in ps.c:603
-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 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:"), |