]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
stasis/control.c: Add destructor to timeout_datastore.
authorGeorge Joseph <gjoseph@sangoma.com>
Wed, 31 Dec 2025 13:47:34 +0000 (06:47 -0700)
committerAsterisk Development Team <asteriskteam@digium.com>
Mon, 12 Jan 2026 16:26:56 +0000 (16:26 +0000)
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

index 8efc35bcd31ef0ac3d8f1ffdf1f52bf5e02f5e9b..b5bd9458f931c14a38749539d893831571e0527a 100644 (file)
@@ -1196,8 +1196,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,