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

mraa_iio_detect() memory leak #1088

Open
jpramosi opened this issue Apr 24, 2022 · 0 comments
Open

mraa_iio_detect() memory leak #1088

jpramosi opened this issue Apr 24, 2022 · 0 comments

Comments

@jpramosi
Copy link

The function 'mraa_iio_detect()' leaks memory: #1, #2.

Proof with LeakSanitizer without line numbers, but it is obvious anyway:


=================================================================
==34795==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0xaaaab89d231c in __interceptor_calloc (/home/dietpi/local/ow/build/bin/mcpr+0xb231c) (BuildId: db26b1ae0f81d680a1e858a7aa504a362feb8a83)
    #1 0xffff9b7687f4 in mraa_iio_detect (/usr/local/lib/libmraa.so.2+0x97f4) (BuildId: f3fa2d24a2e40b1fbf7b52fb3b68077acbd8f3d7)
    #2 0xffff9b7681a4 in imraa_init (/usr/local/lib/libmraa.so.2+0x91a4) (BuildId: f3fa2d24a2e40b1fbf7b52fb3b68077acbd8f3d7)
    #3 0xffff9b768384 in mraa_init (/usr/local/lib/libmraa.so.2+0x9384) (BuildId: f3fa2d24a2e40b1fbf7b52fb3b68077acbd8f3d7)
    #4 0xffff9b7d4938  (/lib/ld-linux-aarch64.so.1+0xe938) (BuildId: 7368ab49979bd38b1708290d9d22f6bd4fbe2e45)
    #5 0xffff9b7d4a40  (/lib/ld-linux-aarch64.so.1+0xea40) (BuildId: 7368ab49979bd38b1708290d9d22f6bd4fbe2e45)
    #6 0xffff9b7c71c0  (/lib/ld-linux-aarch64.so.1+0x11c0) (BuildId: 7368ab49979bd38b1708290d9d22f6bd4fbe2e45)

Objects leaked above:
0xffff96201ea0 (96 bytes)

Indirect leak of 18 byte(s) in 1 object(s) allocated from:
    #0 0xaaaab89d2140 in malloc (/home/dietpi/local/ow/build/bin/mcpr+0xb2140) (BuildId: db26b1ae0f81d680a1e858a7aa504a362feb8a83)
    #1 0xffff9b7688cc in mraa_iio_detect (/usr/local/lib/libmraa.so.2+0x98cc) (BuildId: f3fa2d24a2e40b1fbf7b52fb3b68077acbd8f3d7)
    #2 0xffff9b7681a4 in imraa_init (/usr/local/lib/libmraa.so.2+0x91a4) (BuildId: f3fa2d24a2e40b1fbf7b52fb3b68077acbd8f3d7)
    #3 0xffff9b768384 in mraa_init (/usr/local/lib/libmraa.so.2+0x9384) (BuildId: f3fa2d24a2e40b1fbf7b52fb3b68077acbd8f3d7)
    #4 0xffff9b7d4938  (/lib/ld-linux-aarch64.so.1+0xe938) (BuildId: 7368ab49979bd38b1708290d9d22f6bd4fbe2e45)
    #5 0xffff9b7d4a40  (/lib/ld-linux-aarch64.so.1+0xea40) (BuildId: 7368ab49979bd38b1708290d9d22f6bd4fbe2e45)
    #6 0xffff9b7c71c0  (/lib/ld-linux-aarch64.so.1+0x11c0) (BuildId: 7368ab49979bd38b1708290d9d22f6bd4fbe2e45)

Objects leaked above:
0xffff97200220 (18 bytes)

SUMMARY: AddressSanitizer: 114 byte(s) leaked in 2 allocation(s).

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

1 participant