diff options
author | Pablo Neira Ayuso <pablo@soleta.eu> | 2014-08-28 12:45:04 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@soleta.eu> | 2014-08-28 12:45:04 +0200 |
commit | 0143d6ec18f441433b94b9b3765fb01228c117c1 (patch) | |
tree | 4d4562c69d6eab0c16a4d685b9f7ac6481cae9d1 /src/osmux.c | |
parent | 69d989aa9663527f3186beb37d306c232795506f (diff) |
osmux: add osmux_xfrm_input_fini()
To clean up the osmux input handle.
Diffstat (limited to 'src/osmux.c')
-rw-r--r-- | src/osmux.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/osmux.c b/src/osmux.c index d705781..97e78fa 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -557,6 +557,18 @@ void osmux_xfrm_input_init(struct osmux_in_handle *h) h->internal_data = (void *)batch; } +void osmux_xfrm_input_fini(struct osmux_in_handle *h) +{ + struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; + struct batch_list_node *node, *next; + + llist_for_each_entry_safe(node, next, &batch->node_list, head) { + llist_del(&node->head); + talloc_free(node); + } + talloc_free(batch); +} + struct osmux_tx_handle { struct osmo_timer_list timer; struct msgb *msg; |