odknt / bspwmbar

A lightweight status bar for bspwm.
ISC License
92 stars 11 forks source link

Memory leak in libpluse? (pulseaudio-alsa) #21

Closed odknt closed 1 year ago

odknt commented 4 years ago

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.

domsson commented 4 years ago

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.

odknt commented 1 year ago

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