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
ac49ba79
Commit
ac49ba79
authored
Nov 14, 2016
by
Ghislain MARY
Browse files
Fix invalid read in resolver.
parent
5613cb6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/belle_sip_resolver.c
src/belle_sip_resolver.c
+7
-1
No files found.
src/belle_sip_resolver.c
View file @
ac49ba79
...
...
@@ -701,10 +701,15 @@ static int _resolver_start_query(belle_sip_simple_resolver_context_t *ctx) {
}
static
belle_sip_simple_resolver_context_t
*
resolver_start_query
(
belle_sip_simple_resolver_context_t
*
ctx
)
{
int
error
=
_resolver_start_query
(
ctx
);
int
error
;
/* Take a ref for this part of code because _resolver_start_query() can notify the results and free the ctx if this is not the case. */
belle_sip_object_ref
(
ctx
);
error
=
_resolver_start_query
(
ctx
);
if
(
error
==
0
)
{
if
(
!
ctx
->
base
.
notified
)
{
/* The resolution could not be done synchronously, return the context */
belle_sip_object_unref
(
ctx
);
return
ctx
;
}
/* Otherwise, resolution could be done synchronously */
...
...
@@ -712,6 +717,7 @@ static belle_sip_simple_resolver_context_t * resolver_start_query(belle_sip_simp
/* An error occured. We must notify the app. */
belle_sip_resolver_context_notify
(
BELLE_SIP_RESOLVER_CONTEXT
(
ctx
));
}
belle_sip_object_unref
(
ctx
);
return
NULL
;
}
...
...
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