summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-04-07 14:23:16 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-04-07 14:23:16 +0000
commit08bda445f0dd078d712c462d4809f26131da3272 (patch)
treef05b021d8989aa7dd75b4c52312cac403b7e58f3 /src/transport/plugin_transport_unix.c
parent2136ee822810c9d7453242f98371abaa6ba5d7d1 (diff)
fix for unchecked return value
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index a7cbbf39c..94c160144 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -1315,7 +1315,17 @@ unix_transport_server_start (void *cls)
return GNUNET_SYSERR;
}
if ('\0' != un->sun_path[0])
- GNUNET_DISK_directory_create_for_file (un->sun_path);
+ {
+ if (GNUNET_OK != GNUNET_DISK_directory_create_for_file (un->sun_path))
+ {
+ LOG (GNUNET_ERROR_TYPE_ERROR, _("Cannot create path to `%s'\n"),
+ un->sun_path);
+ GNUNET_NETWORK_socket_close (plugin->unix_sock.desc);
+ plugin->unix_sock.desc = NULL;
+ GNUNET_free (un);
+ return GNUNET_SYSERR;
+ }
+ }
if (GNUNET_OK !=
GNUNET_NETWORK_socket_bind (plugin->unix_sock.desc, (const struct sockaddr *) un, un_len))
{