From b11cf2595987c1f0fc4ffd834f07c98b92aa2355 Mon Sep 17 00:00:00 2001 From: Simon van der Linden Date: Fri, 8 Jan 2010 21:10:28 +0100 Subject: Initialize struct fields to 0 when allocating --- gi/pygi-struct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gi') diff --git a/gi/pygi-struct.c b/gi/pygi-struct.c index 8b672c7..b1e81bf 100644 --- a/gi/pygi-struct.c +++ b/gi/pygi-struct.c @@ -72,7 +72,7 @@ _struct_new (PyTypeObject *type, } size = g_struct_info_get_size((GIStructInfo *)info); - pointer = g_try_malloc(size); + pointer = g_try_malloc0(size); if (pointer == NULL) { PyErr_NoMemory(); goto out; -- cgit