From e174350fef241de8122f3d8b2c454c4d9a2575c6 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Wed, 31 Dec 2025 06:47:34 -0700 Subject: [PATCH] stasis/control.c: Add destructor to timeout_datastore. The timeout_datastore was missing a destructor resulting in a leak of 16 bytes for every outgoing ARI call. Resolves: #1681 --- res/stasis/control.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/res/stasis/control.c b/res/stasis/control.c index 256248ee75..52058ec0c7 100644 --- a/res/stasis/control.c +++ b/res/stasis/control.c @@ -1230,8 +1230,15 @@ static void bridge_after_cb_failed(enum ast_bridge_after_cb_reason reason, * to keep the timeout information local to the channel. * That is what this datastore is for */ + +static void timeout_datastore_data_destructor(void *data) +{ + ast_free(data); +} + struct ast_datastore_info timeout_datastore = { .type = "ARI dial timeout", + .destroy = timeout_datastore_data_destructor, }; static int hangup_channel(struct stasis_app_control *control, -- 2.47.3