Commit Graph

19 Commits (master)

Author SHA1 Message Date
Matthieu MOREL 0a45e0f24d chore(golangci-lint): cover aix and cgo
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 week ago
Matthieu MOREL 30aff030d0 chore(golangci-lint): GOOS and GOARCH matrix
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
3 weeks ago
Matthieu MOREL 9ce2ec161e chore: enable golangci-lint on Windows and MacOS
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 month ago
uubulb 1f39525d2d refactor(darwin): optimize string allocation 2 months ago
Li Chuangbo 19082b35ae
fix: memory leak and string corruption in ARM Mac temperature sensors
This commit addresses several issues in the temperature sensor implementation for ARM Mac:
1. Memory leak caused by unreleased system resources
2. Increasing port counts in Activity Monitor
3. String corruption where the first character becomes "\x00"

Changes:

1. Resource Management:
   - Added proper resource cleanup using `defer` statements
   - Refactored code to share the HID system client instead of creating new ones
   - Fixed memory leaks by ensuring all CoreFoundation objects are properly released

2. String Handling:
   - Fixed buffer allocation for string conversion
   - Properly handle null terminators in C string to Go string conversion
   - Added correct string length calculations

3. Code Structure:
   - Reduced resource allocation by sharing system client between functions
   - Enhanced code readability with better comments
2 months ago
uubulb 10d9c04c2e sensors: avoid passing nil pointer to CFArrayGetCount 5 months ago
Henry Dollman 112f4c00b7 Fix error message typo in sensors_linux 6 months ago
uubulb 701a74be41 feat(cpu, mem, sensors)(darwin): cgo-free implementations 6 months ago
shirou 37f531010d fix golangcilint errors, ignore gosec G115 7 months ago
shirou 5f158096be fix: golangci lint with max -> maxConn 7 months ago
Alessandro De Angelis ba82fefdee fix: add SPDX 8 months ago
Alessandro De Angelis fec0b2fcc6 fix: read temperature sensors darwin arm 8 months ago
UUBulb 4610b55878
fix: typo in `sensors_freebsd` package name 9 months ago
XXIV e19951c34f
fix memory leak 10 months ago
shirou aca0ba4517 [aix]: move tempereture from host to sensors package. 10 months ago
shirou c34d29a8bf fix: rename v3 that remained in file c to v4 10 months ago
shirou d725bd1786 fix lint 10 months ago
shirou 5dfaba1490 [sensors][linux]: add ExLinux on sensors.
This commit references and fixes #1589. Thank you!
10 months ago
shirou ab0d977709 [sensors] move Temperatures from host to sensors. 10 months ago