diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c index 71c4a14489..9ee4a46e0b 100644 --- a/res/ari/resource_channels.c +++ b/res/ari/resource_channels.c @@ -1779,7 +1779,7 @@ void ast_ari_channels_create(struct ast_variable *headers, struct ast_ari_channels_create_args *args, struct ast_ari_response *response) { - struct ast_variable *variables = NULL; + RAII_VAR(struct ast_variable *, variables, NULL, ast_variables_destroy); struct ast_assigned_ids assignedids; struct ari_channel_thread_data *chan_data; struct ast_channel_snapshot *snapshot;