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:
ea351ce
)
Fixed potential NULL dereference.
author
anryko
<a.shvenke@gmail.com>
Sun, 7 Jan 2018 14:43:29 +0000
(15:43 +0100)
committer
anryko
<a.shvenke@gmail.com>
Sun, 7 Jan 2018 14:43:29 +0000
(15:43 +0100)
src/nat/gnunet-nat.c
patch
|
blob
|
history
diff --git
a/src/nat/gnunet-nat.c
b/src/nat/gnunet-nat.c
index b3cf2e9469c50eddd9196ba1baa949a0f81e76e8..72f34362733fd5a65db13ceabcb3b8cddf7979bc 100644
(file)
--- a/
src/nat/gnunet-nat.c
+++ b/
src/nat/gnunet-nat.c
@@
-377,10
+377,16
@@
run (void *cls,
ls = GNUNET_NETWORK_socket_create (af,
SOCK_DGRAM,
IPPROTO_UDP);
+ if (NULL == ls)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
+ "Failed to create socket\n");
+ goto fail_and_shutdown;
+ }
if (GNUNET_OK !=
- GNUNET_NETWORK_socket_bind (ls,
- local_sa,
- local_len))
+
GNUNET_NETWORK_socket_bind (ls,
+
local_sa,
+
local_len))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to bind to %s: %s\n",