From bf4c149f814ce2826f7db487a44d3eef7209ba14 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 17 Jun 2024 17:36:43 +0200 Subject: [PATCH] Fix crash caused by double free() corruption encountered with rev-server addresses with prefix lengths != {8,16,24,32} Signed-off-by: DL6ER --- src/option.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/option.c b/src/option.c index f4ff7c0..8fc2950 100644 --- a/src/option.c +++ b/src/option.c @@ -1188,11 +1188,11 @@ static char *domain_rev4(int from_file, char *server, struct in_addr *addr4, int if (!add_update_server(flags, &serv_addr, &source_addr, interface, domain, NULL)) return _("error"); } - - if (sdetails.orig_hostinfo) - freeaddrinfo(sdetails.orig_hostinfo); } } + + if (sdetails.orig_hostinfo) + freeaddrinfo(sdetails.orig_hostinfo); return NULL; } @@ -1276,11 +1276,11 @@ static char *domain_rev6(int from_file, char *server, struct in6_addr *addr6, in if (!add_update_server(flags, &serv_addr, &source_addr, interface, domain, NULL)) return _("error"); } - - if (sdetails.orig_hostinfo) - freeaddrinfo(sdetails.orig_hostinfo); } } + + if (sdetails.orig_hostinfo) + freeaddrinfo(sdetails.orig_hostinfo); return NULL; }