diff options
author | 2021-01-25 19:47:16 +0000 | |
---|---|---|
committer | 2021-01-25 19:47:16 +0000 | |
commit | 044aaac6d42ec1f1777a52f2fa98b542d731d25c (patch) | |
tree | 56434ca1dd6831d94bb976bfd425c231bb38b9c3 /usr.bin/ssh/ssh-agent.c | |
parent | Give machdep.c a thorough cleanup that is long overdue. (diff) | |
download | wireguard-openbsd-044aaac6d42ec1f1777a52f2fa98b542d731d25c.tar.xz wireguard-openbsd-044aaac6d42ec1f1777a52f2fa98b542d731d25c.zip |
We have this sequence in bridge(4) ioctl(2) path:
ifs = ifunit(req->ifbr_ifsname);
if (ifs == NULL) {
error = ENOENT;
break;
}
if (ifs->if_bridgeidx != ifp->if_index) {
error = ESRCH;
break;
}
bif = bridge_getbif(ifs);
This sequence repeats 8 times. Also we don't check value returned by
bridge_getbig() before use. Newly introduced bridge_getbig() function
replaces this sequence. This not only reduces duplicated code but also
makes `bif' dereference safe.
ok bluhm@
Diffstat (limited to 'usr.bin/ssh/ssh-agent.c')
0 files changed, 0 insertions, 0 deletions