summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2007-07-23 17:14:46 -0400
committerRay Strode <rstrode@redhat.com>2007-07-23 17:14:46 -0400
commitdbcb50ccf3ec0d5611b1f1018b387e2ba3731e22 (patch)
tree9dda82f14a5bdcc2c0bd7bf09e07361f8a676c93
parent192658fa204c95330933985e324487764e1bf60d (diff)
zero-initialize memory allocationsHEADmaster
Patch from William Jon McCann
-rw-r--r--test-screensaver-extension.c6
1 files 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);