fix memory leak in resolver
This commit is contained in:
parent
bb161c9190
commit
5ca259f7a1
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue