fix memory leak in resolver

This commit is contained in:
Igor Sysoev 2009-09-16 13:48:11 +00:00
parent 866e958c5d
commit 99651523de

View File

@ -1149,6 +1149,8 @@ ngx_resolver_process_a(ngx_resolver_t *r, u_char *buf, size_t last,
goto failed;
}
ngx_resolver_free(r, name.data);
if (code == 0 && nan == 0) {
code = 3; /* NXDOMAIN */
}
@ -1400,6 +1402,8 @@ failed:
/* unlock name mutex */
ngx_resolver_free(r, name.data);
return;
}