From f2d0582c044e1c7ea338db930fe002d2f41841b0 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Wed, 10 Nov 2010 12:37:44 +0000 Subject: [PATCH] codesonar fix --- src/transport/plugin_transport_udp.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 3b669d80c..d95147a1a 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -723,12 +723,15 @@ run_gnunet_nat_client (struct Plugin *plugin, const char *addr, size_t addrlen) #endif /* Start the server process */ - proc = GNUNET_OS_start_process(NULL, NULL, "gnunet-nat-client", "gnunet-nat-client", plugin->external_address, address_as_string, port_as_string, NULL); + proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-nat-client", "gnunet-nat-client", plugin->external_address, address_as_string, port_as_string, NULL); GNUNET_free(address_as_string); GNUNET_free(port_as_string); - GNUNET_OS_process_wait (proc); - GNUNET_OS_process_close (proc); - proc = NULL; + if (proc != NULL) + { + GNUNET_OS_process_wait (proc); + GNUNET_OS_process_close (proc); + proc = NULL; + } } /** -- 2.25.1