The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1185

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) ===
2cb80427bc468f7647309c3eca66cfc9afa85b61 introduced a malloc without a
matching free.

Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
From f686506dfb2a7fe61b4ff1b3192bef6db19be2ac Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.ander...@canonical.com>
Date: Tue, 13 Sep 2016 16:42:20 -0600
Subject: [PATCH] c/r: free valid_opts if necessary

2cb80427bc468f7647309c3eca66cfc9afa85b61 introduced a malloc without a
matching free.

Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
---
 src/lxc/lxccontainer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index c02e587..a1c94a1 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -4007,6 +4007,9 @@ static int do_lxcapi_migrate(struct lxc_container *c, 
unsigned int cmd,
                ret = -EINVAL;
        }
 
+       if (size < sizeof(*opts))
+               free(valid_opts);
+
        return ret;
 }
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to