iSulad/0002-fix-memory-leak.patch
lifeng68 97f5e13ccd isulad: set log level to warning in quota
Signed-off-by: lifeng68 <lifeng68@huawei.com>
2020-09-18 11:55:53 +08:00

36 lines
1.4 KiB
Diff

From 1c292f4e0cd854a08051bbaae205d7868966058b Mon Sep 17 00:00:00 2001
From: WangFengTu <wangfengtu@huawei.com>
Date: Fri, 11 Sep 2020 10:07:17 +0800
Subject: [PATCH 02/10] fix memory leak
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
---
src/daemon/modules/image/oci/registry/certs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/daemon/modules/image/oci/registry/certs.c b/src/daemon/modules/image/oci/registry/certs.c
index 68ad549..7808d3f 100644
--- a/src/daemon/modules/image/oci/registry/certs.c
+++ b/src/daemon/modules/image/oci/registry/certs.c
@@ -79,7 +79,7 @@ static int load_certs(const char *path, const char *name, bool use_decrypted_key
return -1;
}
- if (ca_file != NULL && util_has_suffix(name, CA_SUFFIX)) {
+ if (*ca_file != NULL && util_has_suffix(name, CA_SUFFIX)) {
*ca_file = util_path_join(path, name);
if (*ca_file == NULL) {
ret = -1;
@@ -87,7 +87,7 @@ static int load_certs(const char *path, const char *name, bool use_decrypted_key
goto out;
}
goto out;
- } else if (cert_file != NULL && *cert_file == NULL && util_has_suffix(name, CLIENT_CERT_SUFFIX)) {
+ } else if (*cert_file != NULL && *key_file == NULL && util_has_suffix(name, CLIENT_CERT_SUFFIX)) {
key_name = corresponding_key_name(name);
if (key_name == NULL) {
ERROR("find corresponding key name for cert failed");
--
2.25.1