Skip to content

Commit

Permalink
client/allocrunner/taskrunner: client.Close after err check (#8825)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs authored and tgross committed Sep 4, 2020
1 parent e8a418b commit e860f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/allocrunner/taskrunner/plugin_supervisor_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ func (h *csiPluginSupervisorHook) registerPlugin(socketPath string) (func(), err
// At this point we know the plugin is ready and we can fingerprint it
// to get its vendor name and version
client, err := csi.NewClient(socketPath, h.logger.Named("csi_client").With("plugin.name", h.task.CSIPluginConfig.ID, "plugin.type", h.task.CSIPluginConfig.Type))
defer client.Close()
if err != nil {
return nil, fmt.Errorf("failed to create csi client: %v", err)
}
defer client.Close()

info, err := client.PluginInfo()
if err != nil {
Expand Down

0 comments on commit e860f62

Please sign in to comment.