diff src/glyphs-msw.c @ 396:6719134a07c2 r21-2-13

Import from CVS: tag r21-2-13
author cvs
date Mon, 13 Aug 2007 11:12:05 +0200
parents aabb7f5b1c81
children 74fd4e045ea6
line wrap: on
line diff
--- a/src/glyphs-msw.c	Mon Aug 13 11:11:38 2007 +0200
+++ b/src/glyphs-msw.c	Mon Aug 13 11:12:05 2007 +0200
@@ -686,6 +686,7 @@
 	COLOR_INSTANCE_MSWINDOWS_COLOR (XCOLOR_INSTANCE (XCDR (cons)));
 
       GET_C_STRING_OS_DATA_ALLOCA (XCAR (cons), colortbl[j].name);
+      colortbl[j].name = xstrdup (colortbl[j].name); /* mustn't lose this when we return */
       free_cons (XCONS (cons));
       cons = results;
       results = XCDR (results);
@@ -884,7 +885,13 @@
     }
   
   if (color_symbols)
-    xfree(color_symbols);
+    {
+      while (nsymbols--)
+	{
+	  xfree (color_symbols[nsymbols].name);
+	}
+      xfree(color_symbols);
+    }
   
   /* build a bitmap from the eimage */
   if (!(bmp_info=convert_EImage_to_DIBitmap (device, width, height, eimage,