aboutsummaryrefslogtreecommitdiff
path: root/src/util/server_nc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/server_nc.c')
-rw-r--r--src/util/server_nc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/util/server_nc.c b/src/util/server_nc.c
index 9b6eefe1f..05a4913a8 100644
--- a/src/util/server_nc.c
+++ b/src/util/server_nc.c
@@ -146,6 +146,11 @@ handle_client_disconnect (void *cls,
146 struct ClientList *prev; 146 struct ClientList *prev;
147 struct PendingMessageList *pml; 147 struct PendingMessageList *pml;
148 148
149 if (client == NULL)
150 {
151 nc->server = NULL;
152 return;
153 }
149 prev = NULL; 154 prev = NULL;
150 pos = nc->clients; 155 pos = nc->clients;
151 while (NULL != pos) 156 while (NULL != pos)
@@ -219,9 +224,10 @@ GNUNET_SERVER_notification_context_destroy (struct GNUNET_SERVER_NotificationCon
219 } 224 }
220 GNUNET_free (pos); 225 GNUNET_free (pos);
221 } 226 }
222 GNUNET_SERVER_disconnect_notify_cancel (nc->server, 227 if (nc->server != NULL)
223 &handle_client_disconnect, 228 GNUNET_SERVER_disconnect_notify_cancel (nc->server,
224 nc); 229 &handle_client_disconnect,
230 nc);
225 GNUNET_free (nc); 231 GNUNET_free (nc);
226} 232}
227 233