File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ wdctl_restart(int afd)
253
253
char * sock_name ;
254
254
struct sockaddr_un sa_un ;
255
255
s_config * conf = NULL ;
256
- t_client * client = NULL ;
256
+ t_client * client , * head ;
257
257
char * tempstring = NULL ;
258
258
pid_t pid ;
259
259
socklen_t len ;
@@ -329,7 +329,9 @@ wdctl_restart(int afd)
329
329
330
330
/* The child is connected. Send them over the socket the existing clients */
331
331
LOCK_CLIENT_LIST ();
332
- client = client_get_first_client ();
332
+ client_list_dup (& head );
333
+ UNLOCK_CLIENT_LIST ();
334
+ client = head ;
333
335
while (client ) {
334
336
/* Send this client */
335
337
safe_asprintf (& tempstring ,
@@ -341,7 +343,7 @@ wdctl_restart(int afd)
341
343
free (tempstring );
342
344
client = client -> next ;
343
345
}
344
- UNLOCK_CLIENT_LIST ( );
346
+ client_list_destroy ( head );
345
347
346
348
close (fd );
347
349
You can’t perform that action at this time.
0 commit comments