From d227617a972bb20a974be68bea5032e692a0970f Mon Sep 17 00:00:00 2001 From: "Jorge Boncompte [DTI2]" Date: Tue, 10 Apr 2012 16:57:23 +0200 Subject: lib: remove last uses of sockunion_su2str() Use of this function is prone to memory leaks. This fixes a memory accounting bug for vty denied connections. Signed-off-by: Jorge Boncompte [DTI2] Signed-off-by: David Lamparter --- lib/sockunion.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'lib/sockunion.c') diff --git a/lib/sockunion.c b/lib/sockunion.c index 59770529..cfb6f9c5 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -207,25 +207,6 @@ sockunion_str2su (const char *str) return NULL; } -char * -sockunion_su2str (union sockunion *su) -{ - char str[SU_ADDRSTRLEN]; - - switch (su->sa.sa_family) - { - case AF_INET: - inet_ntop (AF_INET, &su->sin.sin_addr, str, sizeof (str)); - break; -#ifdef HAVE_IPV6 - case AF_INET6: - inet_ntop (AF_INET6, &su->sin6.sin6_addr, str, sizeof (str)); - break; -#endif /* HAVE_IPV6 */ - } - return XSTRDUP (MTYPE_TMP, str); -} - /* Convert IPv4 compatible IPv6 address to IPv4 address. */ static void sockunion_normalise_mapped (union sockunion *su) -- cgit v1.2.1