From 48ba71bbd898db500f486f7c33cb48a7a9908713 Mon Sep 17 00:00:00 2001 From: liuhao Date: Tue, 22 Jan 2019 11:25:45 +0800 Subject: [PATCH 051/138] if ocihook is empty return success Signed-off-by: liuhao Signed-off-by: LiFeng --- src/lxc/conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 48e31af..6ea8f9c 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -4782,9 +4782,12 @@ static int run_oci_hooks(const char *name, const char *lxcpath, struct lxc_conf int ret = 0; char *rootpath; - if (!lc || !lc->ocihooks) { + if (!lc) { return -1; } + if (!lc->ocihooks) { + return 0; + } rootpath = get_root_path(lc->rootfs.path, lc->rootfs.bdev_type); if (!rootpath) { -- 1.8.3.1