Unverified Commit b5ead53a by Christian Brauner Committed by GitHub

Merge pull request #2324 from simos/fix-resource-leak-cid1248106

Fixed resource leak in is_wlan() at network.c
parents 6ef5e0cf 7d1cde93
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment