On Mon, Oct 28, 2013 at 8:33 PM, Lennart Poettering
<[email protected]> wrote:
> On Mon, 28.10.13 20:30, Tom Gundersen ([email protected]) wrote:
>
>>
>> On Mon, Oct 28, 2013 at 6:54 PM, Lennart Poettering
>> <[email protected]> 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
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to