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:
a7dd616
)
fix NPE if hole-external option is not set
author
Christian Grothoff
<christian@grothoff.org>
Fri, 6 Jan 2017 22:34:19 +0000
(23:34 +0100)
committer
Christian Grothoff
<christian@grothoff.org>
Fri, 6 Jan 2017 22:34:19 +0000
(23:34 +0100)
src/nat/gnunet-service-nat.c
patch
|
blob
|
history
diff --git
a/src/nat/gnunet-service-nat.c
b/src/nat/gnunet-service-nat.c
index 2cb2b30ffd578d91756d4826465cb2bd94d7fcce..225d3787431ee61862e52a9fc1cc7df324bfda0d 100644
(file)
--- a/
src/nat/gnunet-service-nat.c
+++ b/
src/nat/gnunet-service-nat.c
@@
-853,8
+853,9
@@
notify_client_external_ipv4_change (void *cls,
int have_v4;
/* (0) check if this impacts 'hole_external' */
- if (0 == strcasecmp (ch->hole_external,
- "AUTO"))
+ if ( (NULL != ch->hole_external) &&
+ (0 == strcasecmp (ch->hole_external,
+ "AUTO")) )
{
struct LocalAddressList lal;
struct sockaddr_in *s4;
@@
-2007,7
+2008,7
@@
client_disconnect_cb (void *cls,
GNUNET_RESOLVER_request_cancel (ch->ext_dns);
ch->ext_dns = NULL;
}
- GNUNET_free (ch->hole_external);
+ GNUNET_free
_non_null
(ch->hole_external);
GNUNET_free (ch->section_name);
GNUNET_free (ch);
}