Index: gtk/gtkstyle.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkstyle.c,v
retrieving revision 1.202
diff -u -p -d -r1.202 gtkstyle.c
--- gtk/gtkstyle.c	26 Nov 2006 19:43:12 -0000	1.202
+++ gtk/gtkstyle.c	24 Dec 2006 04:06:33 -0000
@@ -6407,7 +6407,15 @@ gtk_paint_resize_grip (GtkStyle      *st
 GtkBorder *
 gtk_border_copy (const GtkBorder *border)
 {
-  return (GtkBorder *)g_memdup (border, sizeof (GtkBorder));
+  GtkBorder *ret;
+
+  g_return_val_if_fail (border != NULL, NULL);
+
+  ret = g_slice_new (GtkBorder);
+
+  *ret = *border;
+
+  return ret;
 }
 
 /**
@@ -6419,7 +6427,9 @@ gtk_border_copy (const GtkBorder *border
 void
 gtk_border_free (GtkBorder *border)
 {
-  g_free (border);
+  g_return_if_fail (border != NULL);
+
+  g_slice_free (GtkBorder, border);
 }
 
 GType
