mirror of
https://github.com/nginx/nginx.git
synced 2024-12-22 23:23:32 -06:00
fix memory leak in resolver
This commit is contained in:
parent
866e958c5d
commit
99651523de
@ -1149,6 +1149,8 @@ ngx_resolver_process_a(ngx_resolver_t *r, u_char *buf, size_t last,
|
|||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngx_resolver_free(r, name.data);
|
||||||
|
|
||||||
if (code == 0 && nan == 0) {
|
if (code == 0 && nan == 0) {
|
||||||
code = 3; /* NXDOMAIN */
|
code = 3; /* NXDOMAIN */
|
||||||
}
|
}
|
||||||
@ -1400,6 +1402,8 @@ failed:
|
|||||||
|
|
||||||
/* unlock name mutex */
|
/* unlock name mutex */
|
||||||
|
|
||||||
|
ngx_resolver_free(r, name.data);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user