bug in test-properties-server



i found this bug today.

ok to commit?

jacob
--
In the afterlife, a cute .signature will only get you so far.

Index: test-properties-server.c
===================================================================
RCS file: /cvs/gnome/bonobo/tests/test-properties-server.c,v
retrieving revision 1.9
diff -u -r1.9 test-properties-server.c
--- test-properties-server.c	2001/01/20 15:35:34	1.9
+++ test-properties-server.c	2001/07/17 02:09:37
@@ -62,7 +62,8 @@
 		break;
 
 	case PROP_STRING_TEST:
-		pd->s = BONOBO_ARG_GET_STRING (arg);
+		g_free (pd->s);
+		pd->s = g_strdup (BONOBO_ARG_GET_STRING (arg));
 		break;
 
 	default:
@@ -188,7 +189,7 @@
 	pd->b = TRUE;
 	pd->f = 2.71828182845;
 	pd->d = 3.14159265358;
-	pd->s = "Hello world";
+	pd->s = g_strdup ("Hello world");
 
 	/* Create the property bag. */
 	pb = bonobo_property_bag_new (get_prop, set_prop, pd);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]