summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-16 19:20:34 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-16 19:20:34 +0000
commit8bb308c9a42cf24a67e18c63c749c2696dc8ec3b (patch)
treeb80333498a2fbcfdf993da431047af5a7fa18841 /src/transport/plugin_transport_unix.c
parentce27bb34a6961810c013822199007927c7b7a88e (diff)
-fix use of possibly wrong or uninitialized session
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index a753db5ca..7e2601aed 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -1144,10 +1144,10 @@ unix_plugin_do_write (struct Plugin *plugin)
GNUNET_TRANSPORT_SS_UPDATE);
return; /* Nothing to send at the moment */
}
-
+ session = msgw->session;
sent = unix_real_send (plugin,
plugin->unix_sock.desc,
- &msgw->session->target,
+ &session->target,
(const char *) msgw->msg,
msgw->msgsize,
msgw->priority,
@@ -1169,7 +1169,6 @@ unix_plugin_do_write (struct Plugin *plugin)
GNUNET_CONTAINER_DLL_remove (plugin->msg_head,
plugin->msg_tail,
msgw);
- session = msgw->session;
session->msgs_in_queue--;
GNUNET_assert (session->bytes_in_queue >= msgw->msgsize);
session->bytes_in_queue -= msgw->msgsize;