gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: fix NPE if hole-external op


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix NPE if hole-external option is not set
Date: Fri, 06 Jan 2017 23:34:26 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new a9c68a4  fix NPE if hole-external option is not set
a9c68a4 is described below

commit a9c68a4fcb53d599dc5f0816f3330c169f2fe3a7
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jan 6 23:34:19 2017 +0100

    fix NPE if hole-external option is not set
---
 src/nat/gnunet-service-nat.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index 2cb2b30..225d378 100644
--- 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);
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]