From ecae86c5118d3e3c54ab06e15bb395ccca1e8168 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Mon, 1 Feb 2010 14:18:19 +0000 Subject: [PATCH] coverity fixes --- src/transport/plugin_transport_udp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 5a3e92e1e..7f3566c59 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -165,6 +165,8 @@ static int udp_transport_server_stop (void *cls) { struct Plugin *plugin = cls; + int ret; + GNUNET_assert (udp_sock != NULL); if (plugin->select_task != GNUNET_SCHEDULER_NO_TASK) { @@ -172,9 +174,10 @@ udp_transport_server_stop (void *cls) plugin->select_task = GNUNET_SCHEDULER_NO_TASK; } - GNUNET_NETWORK_socket_close (udp_sock); - udp_sock = NULL; - return GNUNET_OK; + ret = GNUNET_NETWORK_socket_close (udp_sock); + if (ret != GNUNET_SYSERR) + udp_sock = NULL; + return ret; } /** -- 2.25.1