HomeFreeBSD

bsnmp: explicitly test the return value for open_client_{local,udp} in…

Description

bsnmp: explicitly test the return value for open_client_{local,udp} in snmp_open(..)

open_client_* returns -1 on failure; 0 on success. Ensure that the return value is
0 -- otherwise exit snmp_open(..).

MFC after: 1 week
Sponsored by: Dell EMC Isilon

Details

Provenance
ngieAuthored on
Parents
rS315641: bsnmp: don't leak snmp_client.fd in open_client_udp(..) on connect(2) failure
Branches
Unknown
Tags
Unknown