summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdata/gdata-feed.c4
-rw-r--r--gdata/gdata-parsable.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/gdata/gdata-feed.c b/gdata/gdata-feed.c
index 68ed7a06..9609c8f3 100644
--- a/gdata/gdata-feed.c
+++ b/gdata/gdata-feed.c
@@ -612,8 +612,10 @@ parse_json (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GEr
/* Parse the node, passing it the reader cursor. */
entry = GDATA_ENTRY (_gdata_parsable_new_from_json_node (entry_type, reader, NULL, error));
- if (entry == NULL)
+ if (entry == NULL) {
+ json_reader_end_element (reader);
return FALSE;
+ }
/* Calls the callbacks in the main thread */
if (data != NULL)
diff --git a/gdata/gdata-parsable.c b/gdata/gdata-parsable.c
index 242f6b86..85ddaa64 100644
--- a/gdata/gdata-parsable.c
+++ b/gdata/gdata-parsable.c
@@ -526,6 +526,7 @@ _gdata_parsable_new_from_json_node (GType parsable_type, JsonReader *reader, gpo
g_return_val_if_fail (json_reader_read_element (reader, i), NULL);
if (klass->parse_json (parsable, reader, user_data, error) == FALSE) {
+ json_reader_end_element (reader);
g_object_unref (parsable);
return NULL;
}