[Mono-bugs] [Bug 81181][Nor] New - typo in free_cached_pattern() in font.c

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Mar 19 04:30:05 EDT 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by choe.hwanjin at gmail.com.


--- shadow/81181	2007-03-19 03:30:05.000000000 -0500
+++ shadow/81181.tmp.17777	2007-03-19 03:30:05.000000000 -0500
@@ -0,0 +1,53 @@
+Bug#: 81181
+Product: Mono: Class Libraries
+Version: 1.0
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: libgdiplus
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: choe.hwanjin at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: typo in free_cached_pattern() in font.c
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+There is a typo in free_cached_pattern() in font.c.
+This function will delete the allocated GHashTable item. So it should
+delete the key and the value. But it deletes value twice.
+Steps to reproduce the problem:
+Actual Results:
+double free.
+Expected Results:
+How often does this happen? 
+Additional Information:
+gboolean free_cached_pattern (gpointer key, gpointer value, gpointer user)
+        g_free (value); /* -> this should be g_free(key); */
+        FcPatternDestroy ((FcPattern*) value);
+        return TRUE;
+I made a patch for this problem.

More information about the mono-bugs mailing list