diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-01-07 12:50:50 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-01-07 12:50:50 +0100 |
commit | 76b387ae68024934ccd92daa34659ada17dc3955 (patch) | |
tree | 89f585b5ea06202a688d9d975117b9848f8bbc3e | |
parent | 7873611e180052414e10ed5b4d3a21831a2cc1ce (diff) | |
download | gnunet-76b387ae68024934ccd92daa34659ada17dc3955.tar.gz gnunet-76b387ae68024934ccd92daa34659ada17dc3955.zip |
fix free of statically allocated value
-rw-r--r-- | src/nat/gnunet-nat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c index 07ddfb6a3..f198adc0a 100644 --- a/src/nat/gnunet-nat.c +++ b/src/nat/gnunet-nat.c | |||
@@ -37,7 +37,7 @@ static int global_ret; | |||
37 | * Name of section in configuration file to use for | 37 | * Name of section in configuration file to use for |
38 | * additional options. | 38 | * additional options. |
39 | */ | 39 | */ |
40 | static char *section_name = "undefined"; | 40 | static char *section_name; |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * Flag set to 1 if we use IPPROTO_UDP. | 43 | * Flag set to 1 if we use IPPROTO_UDP. |
@@ -300,6 +300,8 @@ run (void *cls, | |||
300 | 300 | ||
301 | if (NULL != local_addr) | 301 | if (NULL != local_addr) |
302 | { | 302 | { |
303 | if (NULL == section_name) | ||
304 | section_name = GNUNET_strdup ("undefined"); | ||
303 | nh = GNUNET_NAT_register (c, | 305 | nh = GNUNET_NAT_register (c, |
304 | section_name, | 306 | section_name, |
305 | proto, | 307 | proto, |