1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591]

This commit is contained in:
Mark Andrews 2005-04-27 00:46:46 +00:00
parent 4276ce9601
commit 7eb9d7c7c3
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,5 @@
1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591]
1849. [doc] All forms of the man pages (docbook, man, html) should
have consistant copyright dates.

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: getipnode.c,v 1.30.2.6 2004/03/09 06:12:33 marka Exp $ */
/* $Id: getipnode.c,v 1.30.2.7 2005/04/27 00:46:46 marka Exp $ */
#include <config.h>
@ -330,6 +330,8 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
n = lwres_getnamebyaddr(lwrctx, LWRES_ADDRTYPE_V6, IN6ADDRSZ,
src, &by);
if (n != 0) {
lwres_conf_clear(lwrctx);
lwres_context_destroy(&lwrctx);
*error_num = HOST_NOT_FOUND;
return (NULL);
}
@ -337,6 +339,7 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
lwres_gnbaresponse_free(lwrctx, &by);
if (he1 == NULL)
*error_num = NO_RECOVERY;
lwres_conf_clear(lwrctx);
lwres_context_destroy(&lwrctx);
return (he1);
}