From d1fbada9a7b520830d8a0c31263aadba97b2dd9d Mon Sep 17 00:00:00 2001 From: Li Feng Date: Mon, 25 Jan 2021 15:01:35 +0800 Subject: [PATCH 16/26] driver: do not set g_graphdriver to NULL Signed-off-by: Li Feng --- .../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