- Fix memory leak after fix for possible memory leak failure.

This commit is contained in:
W.C.A. Wijngaards 2020-11-10 13:51:56 +01:00
parent 3926035f30
commit 7977e1c4cb
2 changed files with 1 additions and 2 deletions

View file

@ -1,5 +1,6 @@
10 November 2020: Wouter
- Fix #341: fixing a possible memory leak.
- Fix memory leak after fix for possible memory leak failure.
27 October 2020: Wouter
- In man page note that tls-cert-bundle is read before permission

View file

@ -1471,7 +1471,6 @@ resolve_ifa_name(struct ifaddrs *ifas, const char *search_ifa, char ***ip_addres
tmpbuf = realloc(*ip_addresses, sizeof(char *) * (*ip_addresses_size + 1));
if(!tmpbuf) {
free(*ip_addresses);
log_err("realloc failed: out of memory");
return 0;
} else {
@ -1488,7 +1487,6 @@ resolve_ifa_name(struct ifaddrs *ifas, const char *search_ifa, char ***ip_addres
if (*ip_addresses_size == last_ip_addresses_size) {
tmpbuf = realloc(*ip_addresses, sizeof(char *) * (*ip_addresses_size + 1));
if(!tmpbuf) {
free(*ip_addresses);
log_err("realloc failed: out of memory");
return 0;
} else {