53 lines
1.9 KiB
Diff
53 lines
1.9 KiB
Diff
From 10883d861456fe5daf7e664c0311abed754da8fd Mon Sep 17 00:00:00 2001
|
|
From: liubo <liubo254@huawei.com>
|
|
Date: Mon, 27 Sep 2021 15:58:11 +0800
|
|
Subject: [PATCH 46/50] Fix memory leak in slide engine, remove project show
|
|
cmd error msg.
|
|
|
|
If a process has multiple subprocess, release the task_pid resource of
|
|
the subprocess corresponding to the task when project stops.
|
|
|
|
Remove project show error message if show cmd is executed successfully.
|
|
|
|
Signed-off-by: liubo <liubo254@huawei.com>
|
|
---
|
|
src/etmemd_src/etmemd_project.c | 7 ++++---
|
|
src/etmemd_src/etmemd_slide.c | 1 +
|
|
2 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/etmemd_src/etmemd_project.c b/src/etmemd_src/etmemd_project.c
|
|
index 53ef567..f7f1885 100644
|
|
--- a/src/etmemd_src/etmemd_project.c
|
|
+++ b/src/etmemd_src/etmemd_project.c
|
|
@@ -611,11 +611,12 @@ enum opt_result etmemd_project_show(const char *project_name, int sock_fd)
|
|
|
|
if (!exists) {
|
|
if (project_name == NULL) {
|
|
- etmemd_log(ETMEMD_LOG_ERR, "no project exists\n");
|
|
+ etmemd_log(ETMEMD_LOG_DEBUG, "no project exists\n");
|
|
+ dprintf_all(sock_fd, "no project exists\n\n");
|
|
} else {
|
|
- etmemd_log(ETMEMD_LOG_ERR, "project: project %s is not existed\n\n", project_name);
|
|
+ etmemd_log(ETMEMD_LOG_DEBUG, "project: project %s is not existed\n\n", project_name);
|
|
+ dprintf_all(sock_fd, "project: project %s is not existed\n\n", project_name);
|
|
}
|
|
- return OPT_PRO_NOEXIST;
|
|
}
|
|
|
|
return OPT_SUCCESS;
|
|
diff --git a/src/etmemd_src/etmemd_slide.c b/src/etmemd_src/etmemd_slide.c
|
|
index a024178..45db00a 100644
|
|
--- a/src/etmemd_src/etmemd_slide.c
|
|
+++ b/src/etmemd_src/etmemd_slide.c
|
|
@@ -227,6 +227,7 @@ free_params:
|
|
|
|
static void slide_clear_task(struct task *tk)
|
|
{
|
|
+ etmemd_free_task_pids(tk);
|
|
free(tk->params);
|
|
tk->params = NULL;
|
|
}
|
|
--
|
|
2.27.0
|
|
|