test-util-sockets: Plug file descriptor leak

Fixes: 4d3a329af5
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Markus Armbruster 2020-11-02 10:44:12 +01:00 committed by Daniel P. Berrangé
parent c7a7a877b7
commit 9ce22da0d8

View File

@ -252,6 +252,7 @@ static gpointer unix_server_thread_func(gpointer user_data)
connfd = accept(fd, (struct sockaddr *)&un, &len);
g_assert_cmpint(connfd, !=, -1);
close(connfd);
close(fd);