diff src/font-mgr.c @ 4799:ca99a807b025

Free, rather than discard, the return value of FcNameUnparse. See message <870180fe1001051404g11355acdp3ee9aab8b1ffb33b@mail.gmail.com> on xemacs-patches.
author Jerry James <james@xemacs.org>
date Tue, 05 Jan 2010 15:06:02 -0700
parents 75975fd0b7fc
children 0d3ccd5a2509
line wrap: on
line diff
--- a/src/font-mgr.c	Mon Jan 04 16:48:55 2010 -0700
+++ b/src/font-mgr.c	Tue Jan 05 15:06:02 2010 -0700
@@ -260,8 +260,13 @@
 */
       (pattern))
 {
+  FcChar8 *name;
+  Lisp_Object result;
   CHECK_FCPATTERN(pattern);
-  return build_fcapi_string (FcNameUnparse (XFCPATTERN_PTR (pattern)));
+  name = FcNameUnparse (XFCPATTERN_PTR (pattern));
+  result = build_fcapi_string (name);
+  xfree (name, FcChar8 *);
+  return result;
 }
 
 DEFUN("fc-pattern-duplicate", Ffc_pattern_duplicate, 1, 1, 0, /*