lxc/0065-Storage-return-true-if-storage_init-init-fail.patch
2019-09-30 11:03:07 -04:00

31 lines
850 B
Diff

From d771f62e77e5d122178b171a06a821af4103e48d Mon Sep 17 00:00:00 2001
From: LiFeng <lifeng68@huawei.com>
Date: Mon, 11 Mar 2019 23:26:27 -0400
Subject: [PATCH 065/122] Storage: return true if storage_init init fail
Signed-off-by: LiFeng <lifeng68@huawei.com>
---
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 18f754a..88ed788 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)
--
1.8.3.1