From db8414f5f9b5b67eec7a0e91aec12c6d34d6b0ad Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 10 Mar 2017 17:39:51 +0100 Subject: [PATCH] fix memory leak --- src/nat/nat_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nat/nat_api.c b/src/nat/nat_api.c index dfe7defc9..a0e9f4793 100644 --- a/src/nat/nat_api.c +++ b/src/nat/nat_api.c @@ -429,6 +429,7 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, if (sizeof (struct sockaddr_in) != addrlens[i]) { GNUNET_break (0); + GNUNET_free (rm); return NULL; } break; @@ -436,6 +437,7 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, if (sizeof (struct sockaddr_in6) != addrlens[i]) { GNUNET_break (0); + GNUNET_free (rm); return NULL; } break; @@ -444,12 +446,14 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, if (sizeof (struct sockaddr_un) != addrlens[i]) { GNUNET_break (0); + GNUNET_free (rm); return NULL; } break; #endif default: GNUNET_break (0); + GNUNET_free (rm); return NULL; } GNUNET_memcpy (off, -- 2.25.1