aboutsummaryrefslogtreecommitdiff
path: root/src/nat
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-08 20:09:59 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-08 20:09:59 +0100
commit869b3a7feb1e130a374540526f24107ded7fb1f9 (patch)
treefef9ce1598c807b607527d534ebe0c9aa42518f7 /src/nat
parented1c91f77cc7402f3c012b7ff2fcb78443c6621f (diff)
downloadgnunet-869b3a7feb1e130a374540526f24107ded7fb1f9.tar.gz
gnunet-869b3a7feb1e130a374540526f24107ded7fb1f9.zip
fix potential NPE
Diffstat (limited to 'src/nat')
-rw-r--r--src/nat/nat_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nat/nat_api.c b/src/nat/nat_api.c
index 826dbd57a..5b4c39682 100644
--- a/src/nat/nat_api.c
+++ b/src/nat/nat_api.c
@@ -709,7 +709,11 @@ GNUNET_NAT_request_reversal (struct GNUNET_NAT_Handle *nh,
709void 709void
710GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh) 710GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *nh)
711{ 711{
712 GNUNET_MQ_destroy (nh->mq); 712 if (NULL != nh->mq)
713 {
714 GNUNET_MQ_destroy (nh->mq);
715 nh->mq = NULL;
716 }
713 GNUNET_free (nh->reg); 717 GNUNET_free (nh->reg);
714 GNUNET_free (nh); 718 GNUNET_free (nh);
715} 719}