[json-glib/json-glib-0-12] builder: Initialize state fields
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib/json-glib-0-12] builder: Initialize state fields
- Date: Sat, 28 May 2011 10:43:52 +0000 (UTC)
commit 1dc959790b04b055e393c28050083b7ddafba9e8
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat May 28 11:36:55 2011 +0100
builder: Initialize state fields
If we're calling g_free() on a field we better make sure that it's either
NULL or contains valid data.
https://bugzilla.gnome.org/show_bug.cgi?id=651271
(cherry picked from commit d784cc6825607c517d7565049108d1f908a1d71b)
Signed-off-by: Emmanuele Bassi <ebassi gnome org>
json-glib/json-builder.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/json-glib/json-builder.c b/json-glib/json-builder.c
index 14e7d18..9fa6859 100644
--- a/json-glib/json-builder.c
+++ b/json-glib/json-builder.c
@@ -268,6 +268,7 @@ json_builder_begin_object (JsonBuilder *builder)
state = g_slice_new (JsonBuilderState);
state->data.object = object;
+ state->member_name = NULL;
state->mode = JSON_BUILDER_MODE_OBJECT;
g_queue_push_head (builder->priv->stack, state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]