Re: [systemd-devel] sd-bus memory check

2020-04-13 Thread Lennart Poettering
On So, 12.04.20 16:45, David J (ema...@icloud.com) wrote: > Hello! > > This is in regards to sd-bus function "sd_bus_open_system", where > Valgrind reports possible memory leak. See the following code: There's a whole section about this in the man page: https://www.freedesktop.org/software/syste

Re: [systemd-devel] sd-bus memory check

2020-04-12 Thread David J
Will, thank you very much. I spent my Sunday debugging this thing! Using sd_bus_flush_close_unref() eliminated the memory leak! Appreciate your help! On April 12, 2020 at 9:20 PM, William Kennington wrote: You are probably looking for sd_bus_flush_close_unref() for this usecase. On Sun

Re: [systemd-devel] sd-bus memory check

2020-04-12 Thread William Kennington
You are probably looking for sd_bus_flush_close_unref() for this usecase. On Sun, Apr 12, 2020 at 11:00 AM David J wrote: > Hello! > > This is in regards to sd-bus function "sd_bus_open_system", where Valgrind > reports possible memory leak. See the following code: > > mem_test.c: > > #include

[systemd-devel] sd-bus memory check

2020-04-12 Thread David J
Hello! This is in regards to sd-bus function "sd_bus_open_system", where Valgrind reports possible memory leak. See the following code: mem_test.c: #include #include #include int main(int argc, char *argv[]) {   sd_bus *bus = NULL;   int r = sd_bus_open_system(&bus);   if (r < 0) {