File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,10 @@ thread_wdctl(void *arg)
100
100
debug (LOG_DEBUG , "Creating socket" );
101
101
wdctl_socket_server = socket (PF_UNIX , SOCK_STREAM , 0 );
102
102
103
+ if (wdctl_socket_server < 0 ) {
104
+ debug (LOG_DEBUG , "Could not get server socket: %s" , strerror (errno ));
105
+ pthread_exit (NULL );
106
+ }
103
107
debug (LOG_DEBUG , "Got server socket %d" , wdctl_socket_server );
104
108
105
109
/* If it exists, delete... Not the cleanest way to deal. */
@@ -292,6 +296,10 @@ wdctl_restart(int afd)
292
296
debug (LOG_DEBUG , "Creating socket" );
293
297
sock = socket (PF_UNIX , SOCK_STREAM , 0 );
294
298
299
+ if (sock < 0 ) {
300
+ debug (LOG_DEBUG , "Could not get server socket: %s" , strerror (errno ));
301
+ pthread_exit (NULL );
302
+ }
295
303
debug (LOG_DEBUG , "Got internal socket %d" , sock );
296
304
297
305
/* If it exists, delete... Not the cleanest way to deal. */
You can’t perform that action at this time.
0 commit comments