From dbcb50ccf3ec0d5611b1f1018b387e2ba3731e22 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 23 Jul 2007 17:14:46 -0400 Subject: zero-initialize memory allocations Patch from William Jon McCann --- test-screensaver-extension.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-screensaver-extension.c b/test-screensaver-extension.c index 0af82e2..81129e9 100644 --- a/test-screensaver-extension.c +++ b/test-screensaver-extension.c @@ -123,7 +123,7 @@ test_screensaver_engine_new (GdkWindow *toplevel_window, { TestScreensaverEngine *engine; - engine = g_slice_new (TestScreensaverEngine); + engine = g_slice_new0 (TestScreensaverEngine); engine->window = create_engine_window (toplevel_window, area); engine->draw = test_screensaver_engine_do_draw; @@ -144,7 +144,7 @@ test_screensaver_head_new (int monitor_number, { TestScreensaverHead *head; - head = g_slice_new (TestScreensaverHead); + head = g_slice_new0 (TestScreensaverHead); head->number = monitor_number; head->area = *area; head->engine = NULL; @@ -171,7 +171,7 @@ test_screensaver_new (GMainContext *context, root_window = gdk_screen_get_root_window (screen); - screensaver = g_slice_new (TestScreensaver); + screensaver = g_slice_new0 (TestScreensaver); screensaver->context = g_main_context_ref (context); screensaver->screen = screen; screensaver->drawable = GDK_DRAWABLE (root_window); -- cgit v1.2.3