Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

probe_sensor in raspiraw.c is leaking #6

Closed
QiangLi1016 opened this issue May 4, 2017 · 2 comments
Closed

probe_sensor in raspiraw.c is leaking #6

QiangLi1016 opened this issue May 4, 2017 · 2 comments

Comments

@QiangLi1016
Copy link

If the while loop does not find any sensor, the function still return the last sensor searched, instead of NULL.

@6by9
Copy link
Owner

6by9 commented May 5, 2017

Not really a leak as there is no allocation involved.

It is true that it does return the last sensor.
(a) it is really only test code. Error handling is pretty minimal.
(b) I'm actually making use of that at the moment whilst developing something else!
(c) it could really do with more sensible command line parsing, and that should allow specifying the sensor and also the use of I2C_FORCE_SLAVE to ignore kernel drivers that have registered the I2C port/address combination.

6by9 added a commit that referenced this issue May 8, 2017
Previously it just took the last sensor defined.
Fixes issue #6.
@6by9
Copy link
Owner

6by9 commented May 8, 2017

Fixed.

@6by9 6by9 closed this as completed May 8, 2017
6by9 added a commit that referenced this issue Nov 18, 2017
Previously it just took the last sensor defined.
Fixes issue #6.
6by9 added a commit that referenced this issue Nov 29, 2017
Previously it just took the last sensor defined.
Fixes issue #6.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants