projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce9687f
)
Check return value of GNUNET_NETWORK_socket_create
author
David Barksdale
<amatus@amat.us>
Wed, 16 Nov 2016 06:21:31 +0000
(15:21 +0900)
committer
David Barksdale
<amatus@amatus.name>
Thu, 17 Nov 2016 22:11:15 +0000
(16:11 -0600)
src/util/client_new.c
patch
|
blob
|
history
diff --git
a/src/util/client_new.c
b/src/util/client_new.c
index 593d3a268612d0a60527bc62cad29b0135337e9a..337d0673452f003ea88ab30e99022750a1a5bc43 100644
(file)
--- a/
src/util/client_new.c
+++ b/
src/util/client_new.c
@@
-495,11
+495,12
@@
try_unixpath (const char *service_name,
sock = GNUNET_NETWORK_socket_create (AF_UNIX,
SOCK_STREAM,
0);
- if ( (GNUNET_OK ==
- GNUNET_NETWORK_socket_connect (sock,
- (struct sockaddr *) &s_un,
- sizeof (s_un))) ||
- (EINPROGRESS == errno) )
+ if ( (NULL != sock) &&
+ ( (GNUNET_OK ==
+ GNUNET_NETWORK_socket_connect (sock,
+ (struct sockaddr *) &s_un,
+ sizeof (s_un))) ||
+ (EINPROGRESS == errno) ) )
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Successfully connected to unixpath `%s'!\n",