From 42f6fab4cf8c7bd9e913847ecd82bd16ba8b984b Mon Sep 17 00:00:00 2001 From: Marco d'Itri Date: Tue, 22 May 2018 04:33:34 +0200 Subject: Fix a use after free in convert_in6arpa() Looks like I forgot a free() call after changing the API. Reported by Coverity Scan. --- whois.c | 1 - 1 file changed, 1 deletion(-) (limited to 'whois.c') diff --git a/whois.c b/whois.c index 350a56a..a784e8d 100644 --- a/whois.c +++ b/whois.c @@ -1356,7 +1356,6 @@ char *convert_in6arpa(const char *s) /* check that this is a valid digit for an IPv6 address */ if (!((*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') || (*p >= 'A' && *p <= 'F'))) { - free(ip); ip[character] = '\0'; return ip; } -- cgit v1.2.3