From 25298936a61ab979b733cf02358ffff22f57b23a Mon Sep 17 00:00:00 2001 From: Michal Rostecki Date: Fri, 30 Nov 2018 17:19:46 +0100 Subject: [PATCH] genetlink: Add missing error check Before this change, error returned by `parseFamilies` was silently ignored. Signed-off-by: Michal Rostecki --- genetlink_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/genetlink_linux.go b/genetlink_linux.go index ce79699..772e583 100644 --- a/genetlink_linux.go +++ b/genetlink_linux.go @@ -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") }