mirror of https://github.com/vishvananda/netlink
genetlink: Add missing error check
Before this change, error returned by `parseFamilies` was silently ignored. Signed-off-by: Michal Rostecki <mrostecki@suse.de>
This commit is contained in:
parent
91b013f9ed
commit
25298936a6
|
@ -157,6 +157,9 @@ func (h *Handle) GenlFamilyGet(name string) (*GenlFamily, error) {
|
|||
return nil, err
|
||||
}
|
||||
families, err := parseFamilies(msgs)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(families) != 1 {
|
||||
return nil, fmt.Errorf("invalid response for GENL_CTRL_CMD_GETFAMILY")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue