diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-04-16 13:02:28 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-04-16 13:04:26 +0200 |
commit | 513eb27dae4e42277f91bf746b3c3dcb9d633ead (patch) | |
tree | 1b1458d64bc1d94ae1a7162d8f187e6df9000fbc /system-linux.c | |
parent | df1625da2dd5fd0496c0c9d92490eba0cb9117f8 (diff) |
system-linux: check ioctl return value in system_vlan()
Detected by Coverity in CID 1433754
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'system-linux.c')
-rw-r--r-- | system-linux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system-linux.c b/system-linux.c index 0b594f6..9b654d1 100644 --- a/system-linux.c +++ b/system-linux.c @@ -1250,7 +1250,8 @@ static int system_vlan(struct device *dev, int id) .u.name_type = VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, }; - ioctl(sock_ioctl, SIOCSIFVLAN, &ifr); + if (ioctl(sock_ioctl, SIOCSIFVLAN, &ifr) < 0) + return -1; if (id < 0) { ifr.cmd = DEL_VLAN_CMD; |