projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
287be62
)
fix memory leak
author
Christian Grothoff
<christian@grothoff.org>
Fri, 10 Mar 2017 16:39:51 +0000
(17:39 +0100)
committer
Christian Grothoff
<christian@grothoff.org>
Fri, 10 Mar 2017 16:39:51 +0000
(17:39 +0100)
src/nat/nat_api.c
patch
|
blob
|
history
diff --git
a/src/nat/nat_api.c
b/src/nat/nat_api.c
index dfe7defc98d2a4844e9dcbeb1ef16b70b4c2bbad..a0e9f4793d533f4bf4c788daa0a20aa790e660bd 100644
(file)
--- 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,