diff --git a/lib/api.c b/lib/api.c index 225c495a8..3a7912242 100644 --- a/lib/api.c +++ b/lib/api.c @@ -272,7 +272,6 @@ int api_init(struct api *a, struct super_node *sn) if (ret) return ret; - memory_init(0); ret = queue_signalled_init(&a->pending, 1024, &memory_type_heap, 0); if (ret) return ret; diff --git a/lib/super_node.c b/lib/super_node.c index cb782bf48..a66c93452 100644 --- a/lib/super_node.c +++ b/lib/super_node.c @@ -49,6 +49,7 @@ int super_node_init(struct super_node *sn) log_init(&sn->log, V, LOG_ALL); #ifdef WITH_API + memory_init(0); api_init(&sn->api, sn); #endif /* WITH_API */ #ifdef WITH_WEB