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:
Aram Sargsyan
2022-03-07 11:24:09 +00:00
parent e229d46a87
commit 963f6a2203

View File

@@ -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) {