summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/res_pjsip_t38.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index d1ec07610..1dba15a12 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -113,7 +113,11 @@ static struct t38_parameters_task_data *t38_parameters_task_data_alloc(struct as
data->session = session;
ao2_ref(session, +1);
- data->frame = frame;
+ data->frame = ast_frdup(frame);
+ if (!data->frame) {
+ ao2_ref(data, -1);
+ data = NULL;
+ }
return data;
}
@@ -396,8 +400,6 @@ static struct ast_frame *t38_framehook_write(struct ast_sip_session *session, st
if (ast_sip_push_task(session->serializer, t38_interpret_parameters, data)) {
ao2_ref(data, -1);
}
-
- f = &ast_null_frame;
} else if (f->frametype == AST_FRAME_MODEM) {
RAII_VAR(struct ast_sip_session_media *, session_media, NULL, ao2_cleanup);