aboutsummaryrefslogtreecommitdiff
path: root/src/timezone-completion.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/timezone-completion.c')
-rw-r--r--src/timezone-completion.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/timezone-completion.c b/src/timezone-completion.c
index 5a0e31b..183dfd5 100644
--- a/src/timezone-completion.c
+++ b/src/timezone-completion.c
@@ -98,8 +98,10 @@ json_parse_ready (GObject *object, GAsyncResult *res, gpointer user_data)
JsonReader * reader = json_reader_new (json_parser_get_root (JSON_PARSER (object)));
- if (!json_reader_is_array (reader))
+ if (!json_reader_is_array (reader)) {
+ g_object_unref (G_OBJECT (reader));
return;
+ }
gint i, count = json_reader_count_elements (reader);
for (i = 0; i < count; ++i) {