diff --git a/src/at_response.c b/src/at_response.c index ee2a28e8..f245c5de 100644 --- a/src/at_response.c +++ b/src/at_response.c @@ -3040,9 +3040,9 @@ struct at_response_taskproc_data* at_response_taskproc_data_alloc(struct pvt* co static void response_taskproc(struct pvt_taskproc_data* ptd) { - RAII_VAR(struct at_response_taskproc_data* const, rtd, (struct at_response_taskproc_data*)ptd, ast_free); + struct at_response_taskproc_data* const rtd = (struct at_response_taskproc_data*)ptd; + const at_res_t at_res = at_str2res(&rtd->response); - const at_res_t at_res = at_str2res(&rtd->response); if (at_res != RES_UNKNOWN) { ast_str_trim_blanks(&rtd->response); } diff --git a/src/chan_quectel.c b/src/chan_quectel.c index 637ab11c..5cd4e814 100644 --- a/src/chan_quectel.c +++ b/src/chan_quectel.c @@ -684,6 +684,7 @@ int pvt_taskproc_lock_and_execute(struct pvt_taskproc_data* ptd, void (*task_exe task_exe(ptd); ast_debug(6, "[%s][%s] Task executed\n", PVT_ID(ptd->pvt), S_OR(task_name, "UNKNOWN")); AO2_UNLOCK_AND_UNREF(ptd->pvt); + ast_free(ptd); return 0; }