Make golint fail on errors. (#105)

* make lint fail on errors
* fix lint errors
This commit is contained in:
Sebastian Zagrodzki
2021-11-02 12:52:11 +01:00
committed by GitHub
parent d3bdbe53c8
commit bdb184b25c
4 changed files with 11 additions and 10 deletions

View File

@@ -209,7 +209,7 @@ func (libusbImpl) getDevices(ctx *libusbContext) ([]*libusbDevice, error) {
for _, d := range devs {
ret = append(ret, (*libusbDevice)(d))
}
// devices must be dereferenced by the caller to prevent memoryleaks
// devices must be dereferenced by the caller to prevent memory leaks.
C.libusb_free_device_list(list, 0)
return ret, nil
}