From 011afc6bcad5638edd2efa15815503631ef7aa69 Mon Sep 17 00:00:00 2001 From: jikai Date: Sat, 27 Jan 2024 15:29:36 +0800 Subject: [PATCH 194/198] ensure default spec has linux resources Signed-off-by: jikai --- src/daemon/modules/spec/specs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/daemon/modules/spec/specs.c b/src/daemon/modules/spec/specs.c index 781282f5..dd6e413b 100644 --- a/src/daemon/modules/spec/specs.c +++ b/src/daemon/modules/spec/specs.c @@ -2382,11 +2382,11 @@ const oci_runtime_spec *get_readonly_default_oci_spec(bool system_container) int spec_module_init(void) { g_rdspec.cont = default_spec(false); - if (g_rdspec.cont == NULL) { + if (g_rdspec.cont == NULL || make_sure_oci_spec_linux_resources(g_rdspec.cont) != 0) { return -1; } g_rdspec.system_cont = default_spec(true); - if (g_rdspec.system_cont == NULL) { + if (g_rdspec.system_cont == NULL || make_sure_oci_spec_linux_resources(g_rdspec.system_cont) != 0) { return -1; } return 0; -- 2.25.1