[systemd-devel] [RFC][PATCH] udev: add network link configuration tool
Tom Gundersen
teg at jklm.no
Mon Oct 28 21:07:14 CET 2013
On Mon, Oct 28, 2013 at 8:33 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Mon, 28.10.13 20:30, Tom Gundersen (teg at jklm.no) wrote:
>
>>
>> On Mon, Oct 28, 2013 at 6:54 PM, Lennart Poettering
>> <lennart at poettering.net> wrote:
>> >> +struct link_config_ctx {
>> >> + LIST_HEAD(link_config, links);
>> >> +
>> >> + char **link_dirs;
>> >> + usec_t *link_dirs_ts_usec;
>> >> +};
>> >
>> > Maybe define a local _cleanup_ macro here?
>> >
>> > _cleanup_(link_configs_freep)?
>>
>> Hm, I don't follow. Where could this macro actually be used?
>
> In the _new() allocator I thought? Or no?
Hm, wouldn't the new object (ctx) unconditionally be freed when _new()
returns, even if we do "*ret=ctx ; return 0"? Or am I misunderstanding
how this stuff works?
-t
More information about the systemd-devel
mailing list