From ae983a8fa70e3196bfd9aa4ca42bfd00418d919b Mon Sep 17 00:00:00 2001 From: Lauren Voswinkel Date: Thu, 15 Oct 2020 13:17:59 -0700 Subject: [PATCH] Fixing up some more small issues --- plugins/database/hana/hana.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/database/hana/hana.go b/plugins/database/hana/hana.go index 3bbda5b97054..b35c7e5e02ad 100644 --- a/plugins/database/hana/hana.go +++ b/plugins/database/hana/hana.go @@ -56,7 +56,7 @@ func (h *HANA) secretValues() map[string]string { func (h *HANA) Initialize(ctx context.Context, req newdbplugin.InitializeRequest) (newdbplugin.InitializeResponse, error) { conf, err := h.Init(ctx, req.Config, req.VerifyConnection) if err != nil { - return newdbplugin.InitializeResponse{}, fmt.Errorf("error initializing db: %s", err) + return newdbplugin.InitializeResponse{}, fmt.Errorf("error initializing db: %w", err) } return newdbplugin.InitializeResponse{ @@ -289,7 +289,7 @@ func (h *HANA) updateUserExpiration(ctx context.Context, tx *sql.Tx, username st // Revoking hana user will deactivate user and try to perform a soft drop func (h *HANA) DeleteUser(ctx context.Context, req newdbplugin.DeleteUserRequest) (newdbplugin.DeleteUserResponse, error) { h.Lock() - h.Unlock() + defer h.Unlock() // default revoke will be a soft drop on user if len(req.Statements.Commands) == 0 {