]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix resource leak of netdev on error path found by coverity
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Apr 2013 02:59:02 +0000 (21:59 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 15 Apr 2013 02:59:20 +0000 (21:59 -0500)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/confile.c

index 38685fb0d41e135af3408303c033da34679a4e39..29d3b23fa8a1485507810d78b9936f4d55ba0ca6 100644 (file)
@@ -272,6 +272,7 @@ static int config_network_type(const char *key, const char *value,
        list = malloc(sizeof(*list));
        if (!list) {
                SYSERROR("failed to allocate memory");
+               free(netdev);
                return -1;
        }