From 86c34d70d2a3e213945bda652ccb970bc89b79c6 Mon Sep 17 00:00:00 2001 From: LiFeng Date: Mon, 11 Mar 2019 23:26:27 -0400 Subject: [PATCH 065/131] Storage: return true if storage_init init fail Signed-off-by: LiFeng --- src/lxc/storage/storage.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/storage/storage.c b/src/lxc/storage/storage.c index 18f754a4..88ed7884 100644 --- a/src/lxc/storage/storage.c +++ b/src/lxc/storage/storage.c @@ -610,8 +610,11 @@ bool storage_destroy(struct lxc_conf *conf) int destroy_rv = 0; r = storage_init(conf); - if (!r) + if (r == NULL) { + ERROR("%s 's storage init failed, the storage may be deleted already", conf->name); + ret = true; return ret; + } destroy_rv = r->ops->destroy(r); if (destroy_rv == 0) -- 2.23.0