Skip to content

Commit

Permalink
Fix return values in List() in secretservice_linux.go
Browse files Browse the repository at this point in the history
In case of error, return nil for expected map along with error

Signed-off-by: Alakesh Haloi <alakeshh@amazon.com>
  • Loading branch information
alakesh committed Sep 8, 2021
1 parent 6e2a858 commit 48bfed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secretservice/secretservice_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (h Secretservice) List() (map[string]string, error) {
if err != nil {
defer C.g_error_free(err)
errMsg := (*C.char)(unsafe.Pointer(err.message))
return errors.New(C.GoString(errMsg))
return nil, errors.New(C.GoString(errMsg))
}

resp := make(map[string]string)
Expand Down

0 comments on commit 48bfed4

Please sign in to comment.