Skip to content

Commit

Permalink
coverity: #1248106
Browse files Browse the repository at this point in the history
Resource leak

Signed-off-by: Simos Xenitellis <simos.lists@googlemail.com>
  • Loading branch information
Simos Xenitellis authored and Christian Brauner committed May 16, 2018
1 parent 4ecff63 commit b02fb0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lxc/network.c
Expand Up @@ -591,8 +591,10 @@ static char *is_wlan(const char *ifname)
fseek(f, 0, SEEK_END);
physlen = ftell(f);
fseek(f, 0, SEEK_SET);
if (physlen < 0)
if (physlen < 0) {
fclose(f);
goto bad;
}

physname = malloc(physlen + 1);
if (!physname) {
Expand Down

0 comments on commit b02fb0a

Please sign in to comment.