diff options
author | Debian QA Group <packages@qa.debian.org> | 2016-11-06 05:17:47 -0500 |
---|---|---|
committer | Allan Dixon Jr <allandixonjr@gmail.com> | 2016-11-06 05:17:47 -0500 |
commit | 3f1db97b37962bc31cc117d2c88149dd3c6a33a5 (patch) | |
tree | a71b7b49d97b5e9a32ae028a312c7e7c9b053e9f | |
parent | a60a7217271c5226c541f69fd0315d1122cc1c0d (diff) |
fix-bad-free
===================================================================
Gbp-Pq: Name fix-bad-free.diff
-rw-r--r-- | lib/encoding.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/encoding.c b/lib/encoding.c index 432da4e..2c129b8 100644 --- a/lib/encoding.c +++ b/lib/encoding.c @@ -538,7 +538,9 @@ encoding_resolve_font_substitute (struct a2ps_job * job, { /* Find if there is a substitute for that font */ res = pair_get (encoding->substitutes, font_name); - if (!res) + if (res) + res = xstrdup (res); + else /* No. Check if this font is supported */ if (font_exists (job, font_name)) /* Avoid returning sth alloca'd */ |