summaryrefslogtreecommitdiff
path: root/json-glib/json-array.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2015-11-07 15:20:28 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2016-01-28 10:18:25 +0100
commitd8720da7ec351e5f15f6ce7baf96434ea42bb111 (patch)
tree4eff840902099e4928bcf3065e08e5e61c01d87b /json-glib/json-array.c
parentdb7c76dcdc56ccaaa06051ccde5db808783bef22 (diff)
downloadjson-glib-d8720da7ec351e5f15f6ce7baf96434ea42bb111.tar.gz
array: Ensure JsonArray is zero-initialised
Diffstat (limited to 'json-glib/json-array.c')
-rw-r--r--json-glib/json-array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/json-glib/json-array.c b/json-glib/json-array.c
index ebc6d58..b8186e4 100644
--- a/json-glib/json-array.c
+++ b/json-glib/json-array.c
@@ -56,7 +56,7 @@ json_array_new (void)
{
JsonArray *array;
- array = g_slice_new (JsonArray);
+ array = g_slice_new0 (JsonArray);
array->ref_count = 1;
array->elements = g_ptr_array_new ();
@@ -77,7 +77,7 @@ json_array_sized_new (guint n_elements)
{
JsonArray *array;
- array = g_slice_new (JsonArray);
+ array = g_slice_new0 (JsonArray);
array->ref_count = 1;
array->elements = g_ptr_array_sized_new (n_elements);