iSulad/0016-driver-do-not-set-g_graphdriver-to-NULL.patch

33 lines
1.3 KiB
Diff
Raw Normal View History

From d1fbada9a7b520830d8a0c31263aadba97b2dd9d Mon Sep 17 00:00:00 2001
From: Li Feng <lifeng2221dd1@zoho.com.cn>
Date: Mon, 25 Jan 2021 15:01:35 +0800
Subject: [PATCH 16/53] driver: do not set g_graphdriver to NULL
Signed-off-by: Li Feng <lifeng2221dd1@zoho.com.cn>
---
.../image/oci/storage/layer_store/graphdriver/driver.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c b/src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c
index b41132ea..6b1e0922 100644
--- a/src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c
+++ b/src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c
@@ -512,13 +512,7 @@ int graphdriver_cleanup(void)
driver_unlock();
goto out;
}
-
- free((char *)g_graphdriver->home);
- g_graphdriver->home = NULL;
- free(g_graphdriver->backing_fs);
- g_graphdriver->backing_fs = NULL;
- g_graphdriver = NULL;
- // notes, do not driver_unlock and destroy the lock, becase the other threads may wait for it
+ // notes, do not call driver_unlock and destroy the lock, becase the other threads may wait for it
// if we unlock and destroy the lock, may cause the lock failure, and result to coredump
out:
--
2.25.1