mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 20:52:05 -04:00
2314. [bug] Uninitialized memory use on error path in
bin/named/lwdnoop.c. [RT #17476]
This commit is contained in:
parent
2b58801b9a
commit
cef715b655
2 changed files with 12 additions and 10 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
2314. [bug] Uninitialized memory use on error path in
|
||||
bin/named/lwdnoop.c. [RT #17476]
|
||||
|
||||
2313. [cleanup] Silence Coverity warnings. Handle private stacks.
|
||||
[RT #17447] [RT #17478]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwdnoop.c,v 1.11 2007/06/19 23:46:59 tbox Exp $ */
|
||||
/* $Id: lwdnoop.c,v 1.12 2008/01/22 01:51:16 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ ns_lwdclient_processnoop(ns_lwdclient_t *client, lwres_buffer_t *b) {
|
|||
result = lwres_nooprequest_parse(client->clientmgr->lwctx,
|
||||
b, &client->pkt, &req);
|
||||
if (result != LWRES_R_SUCCESS)
|
||||
goto out;
|
||||
goto send_error;
|
||||
|
||||
client->pkt.recvlength = LWRES_RECVLENGTH;
|
||||
client->pkt.authtype = 0; /* XXXMLG */
|
||||
|
|
@ -57,7 +57,7 @@ ns_lwdclient_processnoop(ns_lwdclient_t *client, lwres_buffer_t *b) {
|
|||
lwres = lwres_noopresponse_render(client->clientmgr->lwctx, &resp,
|
||||
&client->pkt, &lwb);
|
||||
if (lwres != LWRES_R_SUCCESS)
|
||||
goto out;
|
||||
goto cleanup_req;
|
||||
|
||||
r.base = lwb.base;
|
||||
r.length = lwb.used;
|
||||
|
|
@ -65,7 +65,7 @@ ns_lwdclient_processnoop(ns_lwdclient_t *client, lwres_buffer_t *b) {
|
|||
client->sendlength = r.length;
|
||||
result = ns_lwdclient_sendreply(client, &r);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto out;
|
||||
goto cleanup_lwb;
|
||||
|
||||
/*
|
||||
* We can now destroy request.
|
||||
|
|
@ -76,13 +76,12 @@ ns_lwdclient_processnoop(ns_lwdclient_t *client, lwres_buffer_t *b) {
|
|||
|
||||
return;
|
||||
|
||||
out:
|
||||
if (req != NULL)
|
||||
lwres_nooprequest_free(client->clientmgr->lwctx, &req);
|
||||
cleanup_lwb:
|
||||
lwres_context_freemem(client->clientmgr->lwctx, lwb.base, lwb.length);
|
||||
|
||||
if (lwb.base != NULL)
|
||||
lwres_context_freemem(client->clientmgr->lwctx,
|
||||
lwb.base, lwb.length);
|
||||
cleanup_req:
|
||||
lwres_nooprequest_free(client->clientmgr->lwctx, &req);
|
||||
|
||||
send_error:
|
||||
ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue