aboutsummaryrefslogtreecommitdiff
path: root/src/rest/rest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rest/rest.c')
-rw-r--r--src/rest/rest.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rest/rest.c b/src/rest/rest.c
index 02eca77e0..3a27c6813 100644
--- a/src/rest/rest.c
+++ b/src/rest/rest.c
@@ -227,11 +227,9 @@ add_json_resource (struct JsonApiObject *obj,
227{ 227{
228 struct JsonApiResource *res; 228 struct JsonApiResource *res;
229 json_t *type_json; 229 json_t *type_json;
230 json_t *id_json;
231 230
232 id_json = json_object_get (res_json, GNUNET_REST_JSONAPI_KEY_ID);
233 type_json = json_object_get (res_json, GNUNET_REST_JSONAPI_KEY_TYPE); 231 type_json = json_object_get (res_json, GNUNET_REST_JSONAPI_KEY_TYPE);
234 if (!json_is_string (id_json) || !json_is_string (type_json)) 232 if (!json_is_string (type_json))
235 return; 233 return;
236 res = GNUNET_new (struct JsonApiResource); 234 res = GNUNET_new (struct JsonApiResource);
237 res->next = NULL; 235 res->next = NULL;