[systemd-devel] [PATCH] sd-bus: fix memory leak in test-bus-chat

Cristian Rodríguez crrodriguez at opensuse.org
Wed May 13 09:40:58 PDT 2015


On Wed, May 13, 2015 at 8:01 AM, Daniel Mack <daniel at zonque.org> wrote:

> We should still keep this flush, right?
>
>> -                sd_bus_unref(bus);
>>          }
>>

The cleanup function already does :

static inline void sd_bus_close_unrefp(sd_bus **bus) {
       if (*bus) {
               sd_bus_flush(*bus);
               sd_bus_close(*bus);
               sd_bus_unref(*bus);
       }
}

Or I am missing something ?


More information about the systemd-devel mailing list