]> git.puffer.fish Git - matthieu/frr.git/commit
lib: nb: add list_entry_done() callback to free resources
authorChristian Hopps <chopps@labn.net>
Wed, 26 Mar 2025 12:48:54 +0000 (12:48 +0000)
committerChristian Hopps <chopps@labn.net>
Thu, 10 Apr 2025 04:49:59 +0000 (04:49 +0000)
commitf9c759ee4e2308613739bda2c58d0073a9586fbb
treecfc93cbb95efb592a72508230159d9632ee6a63c
parentf28394313fc243bc7ef43672cabda4112d861cb4
lib: nb: add list_entry_done() callback to free resources

The existing iteration callback only allows for a daemon to return a
pointer to objects that must already exist and must continue to exists
indefinitely.

To allow the daemon to return allocated iterator objects and for locking
it's container structures we need a callback to tell the daemon when FRR
is done using the returned value, so the daemon can free it (or unlock
etc)

That's what list_entry_done() is for.

Signed-off-by: Christian Hopps <chopps@labn.net>
lib/northbound.c
lib/northbound.h
lib/northbound_oper.c