Fix a function cleanup bug in dns_request_createraw
When get_dispatch() returns an error code, the dns_request_createraw() function jumps to the `cleanup` label, which will leave a previous attachment to the `request` pointer unattached. Fix the issue by jumping to the `detach` label instead.
This commit is contained in:
@@ -558,7 +558,7 @@ again:
|
||||
result = get_dispatch(tcp, newtcp, requestmgr, srcaddr, destaddr, dscp,
|
||||
&connected, &request->dispatch);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
goto detach;
|
||||
}
|
||||
|
||||
if ((options & DNS_REQUESTOPT_FIXEDID) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user