diff --git a/pkg/agent/containerd/containerd.go b/pkg/agent/containerd/containerd.go index fe829ed6ba..9c71e88f0a 100644 --- a/pkg/agent/containerd/containerd.go +++ b/pkg/agent/containerd/containerd.go @@ -197,7 +197,7 @@ func getPrivateRegistries(ctx context.Context, cfg *config.Node) (*templates.Reg return nil, err } logrus.Infof("Using registry config file at %s", cfg.AgentConfig.PrivateRegistry) - if err := yaml.Unmarshal([]byte(privRegistryFile), &privRegistries); err != nil { + if err := yaml.Unmarshal(privRegistryFile, &privRegistries); err != nil { return nil, err } return privRegistries, nil diff --git a/pkg/agent/netpol/utils.go b/pkg/agent/netpol/utils.go index 74980890f9..c4c7a48950 100644 --- a/pkg/agent/netpol/utils.go +++ b/pkg/agent/netpol/utils.go @@ -246,8 +246,8 @@ func (entry *Entry) Del() error { if err != nil { return err } - entry.Set.Parent.Save() - return nil + + return entry.Set.Parent.Save() } // Test wether an entry is in a set or not. Exit status number is zero if the