reviewed: bwelling

1331.   [bug]           lwres_getrrsetbyname leaked memory.  [RT #3159]
This commit is contained in:
Mark Andrews 2002-07-11 04:01:17 +00:00
parent 9d352ffc42
commit d322581e16
2 changed files with 7 additions and 3 deletions

View file

@ -5,6 +5,8 @@
1335. [bug] Options should apply to the internal _bind view.
1331. [bug] lwres_getrrsetbyname leaked memory. [RT #3159]
1330. [bug] 'rndc stop' failed to cause zones to be flushed
sometimes. [RT #3157]

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getrrset.c,v 1.11 2001/07/10 18:25:44 gson Exp $ */
/* $Id: getrrset.c,v 1.11.2.1 2002/07/11 04:01:17 marka Exp $ */
#include <config.h>
@ -175,6 +175,7 @@ lwres_getrrsetbyname(const char *hostname, unsigned int rdclass,
}
lwres_grbnresponse_free(lwrctx, &response);
lwres_conf_clear(lwrctx);
lwres_context_destroy(&lwrctx);
*res = rrset;
return (ERRSET_SUCCESS);
@ -183,10 +184,11 @@ lwres_getrrsetbyname(const char *hostname, unsigned int rdclass,
lwres_freerrset(rrset);
if (response != NULL)
lwres_grbnresponse_free(lwrctx, &response);
if (lwrctx != NULL)
if (lwrctx != NULL) {
lwres_conf_clear(lwrctx);
lwres_context_destroy(&lwrctx);
}
return (result);
}
void