diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-27 12:21:33 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-27 12:21:33 +0000 |
commit | b863769f273b757628c0070bdf6416978d110684 (patch) | |
tree | 4c6d23bcaf89bb4a86458f5baeadce0f19ae03e4 /src/transport/plugin_transport_unix.c | |
parent | 34f48ffc58b888ef3d778f343eaf988a20166127 (diff) | |
download | gnunet-b863769f273b757628c0070bdf6416978d110684.tar.gz gnunet-b863769f273b757628c0070bdf6416978d110684.zip |
- invalid read when socket is already bound
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r-- | src/transport/plugin_transport_unix.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 041a7997a..0d5a84528 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c | |||
@@ -321,10 +321,13 @@ unix_transport_server_stop (void *cls) | |||
321 | plugin->select_task = GNUNET_SCHEDULER_NO_TASK; | 321 | plugin->select_task = GNUNET_SCHEDULER_NO_TASK; |
322 | } | 322 | } |
323 | 323 | ||
324 | GNUNET_break (GNUNET_OK == | 324 | if (NULL != plugin->unix_sock.desc) |
325 | GNUNET_NETWORK_socket_close (plugin->unix_sock.desc)); | 325 | { |
326 | plugin->unix_sock.desc = NULL; | 326 | GNUNET_break (GNUNET_OK == |
327 | plugin->with_ws = GNUNET_NO; | 327 | GNUNET_NETWORK_socket_close (plugin->unix_sock.desc)); |
328 | plugin->unix_sock.desc = NULL; | ||
329 | plugin->with_ws = GNUNET_NO; | ||
330 | } | ||
328 | return GNUNET_OK; | 331 | return GNUNET_OK; |
329 | } | 332 | } |
330 | 333 | ||