代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/open-isns 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From c542da377c3dc070e081c1d26e74531d75f236cc Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Tue, 26 Mar 2024 12:55:45 -0700
Subject: [PATCH] isnsadm: free qry in error paths
There are multiple error handling paths in query_objects and
query_entity_id that do not free the qry allocation.
I realize that isnsadm is a short lived process, and memory leaks are
not an issue, but this will keep static checkers quiet.
Signed-off-by: Chris Leech <cleech@redhat.com>
---
isnsadm.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/isnsadm.c b/isnsadm.c
index 0710877..c4d2264 100644
--- a/isnsadm.c
+++ b/isnsadm.c
@@ -619,20 +619,20 @@ query_objects(isns_client_t *clnt, int argc, char **argv)
status = isns_client_call(clnt, &qry);
if (status != ISNS_SUCCESS) {
isns_error("Query failed: %s\n", isns_strerror(status));
- return status;
+ goto out;
}
status = isns_query_response_get_objects(qry, &objects);
if (status) {
isns_error("Unable to extract object list from query response: %s\n",
isns_strerror(status), status);
- return status;
+ goto out;
}
isns_object_list_print(&objects, isns_print_stdout);
isns_object_list_destroy(&objects);
+out:
isns_simple_free(qry);
-
return status;
}
@@ -664,14 +664,14 @@ query_entity_id(isns_client_t *clnt, int argc, char **argv)
status = isns_client_call(clnt, &qry);
if (status != ISNS_SUCCESS) {
isns_error("Query failed: %s\n", isns_strerror(status));
- return status;
+ goto out;
}
status = isns_query_response_get_objects(qry, &objects);
if (status) {
isns_error("Unable to extract object list from query response: %s\n",
isns_strerror(status), status);
- return status;
+ goto out;
}
status = ISNS_NO_SUCH_ENTRY;
@@ -689,8 +689,8 @@ query_entity_id(isns_client_t *clnt, int argc, char **argv)
}
isns_object_list_destroy(&objects);
+out:
isns_simple_free(qry);
-
return status;
}
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。