mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-09 07:15:27 +00:00
coverity: #1248105
Time of check time of use Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
0382c0da7b
commit
023e2a307a
@ -571,7 +571,6 @@ static char *is_wlan(const char *ifname)
|
|||||||
size_t len;
|
size_t len;
|
||||||
char *path;
|
char *path;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
struct stat sb;
|
|
||||||
char *physname = NULL;
|
char *physname = NULL;
|
||||||
|
|
||||||
len = strlen(ifname) + strlen(PHYSNAME) - 1;
|
len = strlen(ifname) + strlen(PHYSNAME) - 1;
|
||||||
@ -580,10 +579,6 @@ static char *is_wlan(const char *ifname)
|
|||||||
if (ret < 0 || (size_t)ret >= len)
|
if (ret < 0 || (size_t)ret >= len)
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
ret = stat(path, &sb);
|
|
||||||
if (ret)
|
|
||||||
goto bad;
|
|
||||||
|
|
||||||
f = fopen(path, "r");
|
f = fopen(path, "r");
|
||||||
if (!f)
|
if (!f)
|
||||||
goto bad;
|
goto bad;
|
||||||
|
Loading…
Reference in New Issue
Block a user