The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/3452
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === This was an obvious braino on my part to merge this. Out automatic cleanup macros will handle this case just fine so this introduces a double-free. Rever this commit. This reverts commit 9d05339487f4e9c4e7f700f963c161a4d9977ae4.
From 6a5f8648410106dbe614362e001fd1394d744c58 Mon Sep 17 00:00:00 2001 From: Christian Brauner <christian.brau...@ubuntu.com> Date: Thu, 18 Jun 2020 10:28:35 +0200 Subject: [PATCH] Revert "nl: fix memory leak" This was an obvious braino on my part to merge this. Out automatic cleanup macros will handle this case just fine so this introduces a double-free. Rever this commit. This reverts commit 9d05339487f4e9c4e7f700f963c161a4d9977ae4. --- src/lxc/nl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lxc/nl.c b/src/lxc/nl.c index 048a5a53f1..dd94c09c88 100644 --- a/src/lxc/nl.c +++ b/src/lxc/nl.c @@ -106,10 +106,8 @@ struct nlmsg *nlmsg_alloc(size_t size) return ret_set_errno(NULL, ENOMEM); nlmsg->nlmsghdr = malloc(len); - if (!nlmsg->nlmsghdr) { - free(nlmsg); + if (!nlmsg->nlmsghdr) return ret_set_errno(NULL, ENOMEM); - } memset(nlmsg->nlmsghdr, 0, len); nlmsg->cap = len;
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel