lxc: fix hook memory leak
Signed-off-by: LiFeng <lifeng68@huawei.com>
This commit is contained in:
parent
03815219de
commit
57c1bb954f
27
0063-hook-fix-memeory-leak.patch
Normal file
27
0063-hook-fix-memeory-leak.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 5cff3f195151267b65c88c1412aa9553fa1e0510 Mon Sep 17 00:00:00 2001
|
||||
From: LiFeng <lifeng68@huawei.com>
|
||||
Date: Mon, 11 May 2020 12:14:30 +0800
|
||||
Subject: [PATCH] hook: fix memeory leak
|
||||
|
||||
Signed-off-by: LiFeng <lifeng68@huawei.com>
|
||||
---
|
||||
src/lxc/conf.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
|
||||
index ad32725..f46255a 100644
|
||||
--- a/src/lxc/conf.c
|
||||
+++ b/src/lxc/conf.c
|
||||
@@ -5447,6 +5447,9 @@ void lxc_conf_free(struct lxc_conf *conf)
|
||||
lxc_clear_rootfs_ro_paths(conf);
|
||||
free(conf->errmsg);
|
||||
lxc_close_error_pipe(conf->errpipe);
|
||||
+ if (conf->ocihooks) {
|
||||
+ free_oci_runtime_spec_hooks(conf->ocihooks);
|
||||
+ }
|
||||
#endif
|
||||
free(conf);
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
26
0064-termainal-fix-console-log-memory-leak.patch
Normal file
26
0064-termainal-fix-console-log-memory-leak.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From c08e50a792a088715e6752e5f93f8dff65f7cf27 Mon Sep 17 00:00:00 2001
|
||||
From: LiFeng <lifeng68@huawei.com>
|
||||
Date: Mon, 11 May 2020 14:00:17 +0800
|
||||
Subject: [PATCH] termainal: fix console log memory leak
|
||||
|
||||
Signed-off-by: LiFeng <lifeng68@huawei.com>
|
||||
---
|
||||
src/lxc/terminal.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/lxc/terminal.c b/src/lxc/terminal.c
|
||||
index 9b831dc..3d2960b 100644
|
||||
--- a/src/lxc/terminal.c
|
||||
+++ b/src/lxc/terminal.c
|
||||
@@ -2114,6 +2114,8 @@ void lxc_terminal_conf_free(struct lxc_terminal *terminal)
|
||||
free(terminal->init_fifo[1]);
|
||||
free(terminal->init_fifo[2]);
|
||||
lxc_terminal_delete_fifo(-1, &terminal->fifos);
|
||||
+ free(terminal->log_driver);
|
||||
+ free(terminal->log_syslog_tag);
|
||||
#endif
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
4
lxc.spec
4
lxc.spec
@ -1,4 +1,4 @@
|
||||
%global _release 2020050702
|
||||
%global _release 2020051101
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: lxc
|
||||
@ -70,6 +70,8 @@ Patch9058: 0059-set-state-to-stopped.patch
|
||||
Patch9059: 0060-attach-append-error-msg-when-call-attach-failed.patch
|
||||
Patch9060: 0061-mount-fix-symlink-error-use-parsed-path.patch
|
||||
Patch9061: 0062-change-log-level-of-seccomp-setup.patch
|
||||
Patch9062: 0063-hook-fix-memeory-leak.patch
|
||||
Patch9063: 0064-termainal-fix-console-log-memory-leak.patch
|
||||
|
||||
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
|
||||
BuildRequires: pkgconfig(libseccomp)
|
||||
|
||||
@ -60,3 +60,5 @@
|
||||
0060-attach-append-error-msg-when-call-attach-failed.patch
|
||||
0061-mount-fix-symlink-error-use-parsed-path.patch
|
||||
0062-change-log-level-of-seccomp-setup.patch
|
||||
0063-hook-fix-memeory-leak.patch
|
||||
0064-termainal-fix-console-log-memory-leak.patch
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user