Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
13ffea1a
Commit
13ffea1a
authored
Oct 20, 2016
by
Simon Morlat
Browse files
fix invalid read because transaction_set_terminated() may destroy the transaction object.
parent
08ff74f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/transaction.c
src/transaction.c
+5
-5
No files found.
src/transaction.c
View file @
13ffea1a
...
...
@@ -213,6 +213,11 @@ int belle_sip_transaction_state_is_transient(const belle_sip_transaction_state_t
}
void
belle_sip_transaction_terminate
(
belle_sip_transaction_t
*
t
){
if
(
t
->
call_repair_timer
)
{
belle_sip_transaction_stop_timer
(
t
,
t
->
call_repair_timer
);
belle_sip_object_unref
(
t
->
call_repair_timer
);
t
->
call_repair_timer
=
NULL
;
}
if
(
belle_sip_transaction_get_state
(
BELLE_SIP_TRANSACTION
(
t
))
!=
BELLE_SIP_TRANSACTION_TERMINATED
)
{
int
is_client
=
BELLE_SIP_OBJECT_IS_INSTANCE_OF
(
t
,
belle_sip_client_transaction_t
);
belle_sip_transaction_set_state
(
t
,
BELLE_SIP_TRANSACTION_TERMINATED
);
...
...
@@ -227,11 +232,6 @@ void belle_sip_transaction_terminate(belle_sip_transaction_t *t){
BELLE_SIP_OBJECT_VPTR
(
t
,
belle_sip_transaction_t
)
->
on_terminate
(
t
);
belle_sip_provider_set_transaction_terminated
(
t
->
provider
,
t
);
}
if
(
t
->
call_repair_timer
)
{
belle_sip_transaction_stop_timer
(
t
,
t
->
call_repair_timer
);
belle_sip_object_unref
(
t
->
call_repair_timer
);
t
->
call_repair_timer
=
NULL
;
}
}
belle_sip_request_t
*
belle_sip_transaction_get_request
(
const
belle_sip_transaction_t
*
t
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment