]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1248106
authorSimos Xenitellis <simos.lists@googlemail.com>
Tue, 15 May 2018 00:05:13 +0000 (00:05 +0000)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 10 Dec 2018 07:21:42 +0000 (08:21 +0100)
Resource leak

Signed-off-by: Simos Xenitellis <simos.lists@googlemail.com>
src/lxc/network.c

index 889615af3332219de02ced0bcd24306c95aff401..863bb9635a686253ce5140e2644c231f62289151 100644 (file)
@@ -537,7 +537,8 @@ static char * is_wlan(const char *ifname)
        fseek(f, 0, SEEK_END);
        physlen = ftell(f);
        fseek(f, 0, SEEK_SET);
-       physname = malloc(physlen+1);
+
+       physname = malloc(physlen + 1);
        if (!physname) {
                fclose(f);
                goto bad;