mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-03 17:30:53 +00:00
Merge pull request #2324 from simos/fix-resource-leak-cid1248106
Fixed resource leak in is_wlan() at network.c
This commit is contained in:
commit
b5ead53aaf
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user