Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure pj_dns_resolver_start_query() returns NULL for query object when returning from cache #3996

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pjlib-util/src/pjlib-util/resolver.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,12 @@ PJ_DEF(pj_status_t) pj_dns_resolver_start_query( pj_dns_resolver *resolver,
cache->ref_cnt++;
pj_grp_lock_release(resolver->grp_lock);

/* Since we're returning an answer from cache,
* there is no query object to return.
*/
if (p_query)
*p_query = NULL;

/* This cached response is still valid. Just return this
* response to caller.
*/
Expand Down
Loading