mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-10 14:23:36 -05:00
- Fix #1324: Memory leak in 'msgparse.c' in
'parse_edns_options_from_query(...)'.
This commit is contained in:
parent
8faa95354d
commit
af96824642
2 changed files with 8 additions and 4 deletions
|
|
@ -1,6 +1,8 @@
|
|||
2 September 2025: Wouter
|
||||
- Fix #1235: Outdated Python2 code in
|
||||
unbound/pythonmod/examples/log.py.
|
||||
- Fix #1324: Memory leak in 'msgparse.c' in
|
||||
'parse_edns_options_from_query(...)'.
|
||||
|
||||
1 September 2025: Wouter
|
||||
- Fix for #1324: Fix to free edns options scratch in ratelimit case.
|
||||
|
|
|
|||
|
|
@ -1168,11 +1168,13 @@ server_http_endpoint: VAR_HTTP_ENDPOINT STRING_ARG
|
|||
free(cfg_parser->cfg->http_endpoint);
|
||||
if($2 && $2[0] != '/') {
|
||||
cfg_parser->cfg->http_endpoint = malloc(strlen($2)+2);
|
||||
if(!cfg_parser->cfg->http_endpoint)
|
||||
if(cfg_parser->cfg->http_endpoint) {
|
||||
cfg_parser->cfg->http_endpoint[0] = '/';
|
||||
memmove(cfg_parser->cfg->http_endpoint+1, $2,
|
||||
strlen($2)+1);
|
||||
} else {
|
||||
yyerror("out of memory");
|
||||
cfg_parser->cfg->http_endpoint[0] = '/';
|
||||
memmove(cfg_parser->cfg->http_endpoint+1, $2,
|
||||
strlen($2)+1);
|
||||
}
|
||||
free($2);
|
||||
} else {
|
||||
cfg_parser->cfg->http_endpoint = $2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue