mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-13 22:12:15 +00:00
coverity: #1248106
Resource leak Signed-off-by: Simos Xenitellis <simos.lists@googlemail.com>
This commit is contained in:
parent
9ab207cad7
commit
7d1cde93be
@ -591,8 +591,10 @@ static char *is_wlan(const char *ifname)
|
|||||||
fseek(f, 0, SEEK_END);
|
fseek(f, 0, SEEK_END);
|
||||||
physlen = ftell(f);
|
physlen = ftell(f);
|
||||||
fseek(f, 0, SEEK_SET);
|
fseek(f, 0, SEEK_SET);
|
||||||
if (physlen < 0)
|
if (physlen < 0) {
|
||||||
|
fclose(f);
|
||||||
goto bad;
|
goto bad;
|
||||||
|
}
|
||||||
|
|
||||||
physname = malloc(physlen + 1);
|
physname = malloc(physlen + 1);
|
||||||
if (!physname) {
|
if (!physname) {
|
||||||
|
Loading…
Reference in New Issue
Block a user