bspwmbar icon indicating copy to clipboard operation
bspwmbar copied to clipboard

Memory leak in libpluse?

Open odknt opened this issue 4 years ago • 1 comments

Currently debug build output the following error on exit.

==214722==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4 byte(s) in 1 object(s) allocated from:
    #0 0x7f31fecdfcd8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x7f31f9f0219f in pa_xmalloc0 (/usr/lib/libpulse.so.0+0xe19f)

SUMMARY: AddressSanitizer: 4 byte(s) leaked in 1 allocation(s).

I have no idea why the memory leak.

odknt avatar Jan 08 '20 03:01 odknt

I couldn't find any code using libpulse in your repository, but I'll just share the issue I have had with libpulse and memory leaks a while back. Maybe it helps. If not, ignore this. :)

For every call to a libpulse function that returns *pa_operation, you have to have a call to pa_operation_unref(), otherwise you'll be leaking memory.

domsson avatar Jun 18 '20 17:06 domsson

The issue was related to PulseAudio's ALSA interface, but has not been confirmed at this time, so it has been closed.

odknt avatar Jul 08 '23 06:07 odknt