fix free of statically allocated value
authorChristian Grothoff <christian@grothoff.org>
Sat, 7 Jan 2017 11:50:50 +0000 (12:50 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sat, 7 Jan 2017 11:50:50 +0000 (12:50 +0100)
src/nat/gnunet-nat.c

index 07ddfb6a3efdd80ae8cd5ac895a20afb0097367b..f198adc0a4508ad2be5e3037922476b4c126d5c7 100644 (file)
@@ -37,7 +37,7 @@ static int global_ret;
  * Name of section in configuration file to use for 
  * additional options.
  */ 
-static char *section_name = "undefined";
+static char *section_name;
 
 /**
  * Flag set to 1 if we use IPPROTO_UDP.
@@ -300,6 +300,8 @@ run (void *cls,
 
   if (NULL != local_addr)
   {
+    if (NULL == section_name)
+      section_name = GNUNET_strdup ("undefined");
     nh = GNUNET_NAT_register (c,
                              section_name,
                              proto,