X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=debian%2Fpatches%2Ffixes%2F0007-tools-utils-free-memory-on-error.patch;fp=debian%2Fpatches%2Ffixes%2F0007-tools-utils-free-memory-on-error.patch;h=f62d63537d1a0f7cda0afb25d2f656a17e42bb31;hb=99be5c8cba9cd27ea4ffaa5d03bfeffb5d520498;hp=0000000000000000000000000000000000000000;hpb=5c8b444abdf75bfc9eb9893a7e9f6237c95ac337;p=lxc.git diff --git a/debian/patches/fixes/0007-tools-utils-free-memory-on-error.patch b/debian/patches/fixes/0007-tools-utils-free-memory-on-error.patch new file mode 100644 index 0000000..f62d635 --- /dev/null +++ b/debian/patches/fixes/0007-tools-utils-free-memory-on-error.patch @@ -0,0 +1,33 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: C0deAi +Date: Fri, 6 Apr 2018 12:56:50 -0400 +Subject: [PATCH] tools/utils: free memory on error + +Closes #2262. + +Signed-off-by: C0deAi +Signed-off-by: Christian Brauner +--- + src/lxc/tools/tool_utils.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/lxc/tools/tool_utils.c b/src/lxc/tools/tool_utils.c +index ca325456..71e5036b 100644 +--- a/src/lxc/tools/tool_utils.c ++++ b/src/lxc/tools/tool_utils.c +@@ -794,8 +794,11 @@ int lxc_config_define_add(struct lxc_list *defines, char *arg) + return -1; + + dent->elem = parse_line(arg); +- if (!dent->elem) ++ if (!dent->elem) { ++ free(dent); + return -1; ++ } ++ + lxc_list_add_tail(defines, dent); + return 0; + } +-- +2.11.0 +