[Commit] fontconfig/src fcfreetype.c,1.37,1.38

Keith Packard commit@keithp.com
Fri, 16 May 2003 19:17:21 -0700


Committed by: keithp

Update of /local/src/CVS/fontconfig/src
In directory home.keithp.com:/tmp/cvs-serv29884

Modified Files:
	fcfreetype.c 
Log Message:
Fix build error with BDF prop local.  Free langset after query

Index: fcfreetype.c
===================================================================
RCS file: /local/src/CVS/fontconfig/src/fcfreetype.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- fcfreetype.c	16 May 2003 16:37:16 -0000	1.37
+++ fcfreetype.c	17 May 2003 02:17:19 -0000	1.38
@@ -358,6 +358,9 @@
     int		    spacing;
     TT_OS2	    *os2;
     PS_FontInfoRec  psfontinfo;
+#ifdef USE_FTBDF
+    BDF_PropertyRec prop;
+#endif
     TT_Header	    *head;
     const FcChar8   *exclusiveLang = 0;
     FT_SfntName	    sname;
@@ -832,7 +835,6 @@
 
     if (width == -1)
     {
-	BDF_PropertyRec prop;
 	if (MY_Get_BDF_Property(face, "RELATIVE_SETWIDTH", &prop) == 0 &&
 	    (prop.type == BDF_PROPERTY_TYPE_INTEGER ||
 	     prop.type == BDF_PROPERTY_TYPE_CARDINAL))
@@ -964,7 +966,12 @@
 	goto bail2;
 
     if (!FcPatternAddLangSet (pat, FC_LANG, ls))
+    {
+	FcLangSetDestroy (ls);
 	goto bail2;
+    }
+
+    FcLangSetDestroy (ls);
 
     if (spacing != FC_PROPORTIONAL)
 	if (!FcPatternAddInteger (pat, FC_SPACING, spacing))