summaryrefslogtreecommitdiff
path: root/debian/patches/fix-bad-free.diff
blob: 435c4217ac956ff6c1a85d2bbc47e1f6c95c18b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Index: b/lib/encoding.c
===================================================================
--- a/lib/encoding.c
+++ b/lib/encoding.c
@@ -538,7 +538,9 @@
     {
       /* 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 */