summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian QA Group <packages@qa.debian.org>2020-02-17 23:45:13 -0800
committerStephen Kitt <skitt@debian.org>2020-02-17 23:45:13 -0800
commit85e13dc1fec295e7dcf43943e6024ef5cf3f0a9b (patch)
tree1e079d865bbe8c702677159a3fb4728917218e1c
parentf01089b079e98f995943c1145c992c2721409f56 (diff)
fix-bad-free
=================================================================== Gbp-Pq: Name fix-bad-free.diff
-rw-r--r--lib/encoding.c4
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 */