void socket_listen_cleanup(int fd, Error **errp)

{

    SocketAddress *addr;



    addr = socket_local_address(fd, errp);



    if (addr->type == SOCKET_ADDRESS_KIND_UNIX

        && addr->u.q_unix.data->path) {

        if (unlink(addr->u.q_unix.data->path) < 0 && errno != ENOENT) {

            error_setg_errno(errp, errno,

                             "Failed to unlink socket %s",

                             addr->u.q_unix.data->path);

        }

    }



    qapi_free_SocketAddress(addr);

}

void socket_listen_cleanup(int fd, Error **errp)

{

    SocketAddress *addr;



    addr = socket_local_address(fd, errp);



    if (addr->type == SOCKET_ADDRESS_KIND_UNIX

        && addr->u.q_unix.data->path) {

        if (unlink(addr->u.q_unix.data->path) < 0 && errno != ENOENT) {

            error_setg_errno(errp, errno,

                             "Failed to unlink socket %s",

                             addr->u.q_unix.data->path);

        }

    }



    qapi_free_SocketAddress(addr);

}

void FUNC_0(int VAR_0, Error **VAR_1)

{

    SocketAddress *addr;



    addr = socket_local_address(VAR_0, VAR_1);



    if (addr->type == SOCKET_ADDRESS_KIND_UNIX

        && addr->u.q_unix.data->path) {

        if (unlink(addr->u.q_unix.data->path) < 0 && errno != ENOENT) {

            error_setg_errno(VAR_1, errno,

                             "Failed to unlink socket %s",

                             addr->u.q_unix.data->path);

        }

    }



    qapi_free_SocketAddress(addr);

}

void FUNC_0(int VAR_0, Error **VAR_1)
{ SocketAddress *addr; addr = socket_local_address(VAR_0, VAR_1); if (addr->type == SOCKET_ADDRESS_KIND_UNIX
&& addr->u.q_unix.data->path) { if (unlink(addr->u.q_unix.data->path) < 0 && errno != ENOENT) { error_setg_errno(VAR_1, errno,
"Failed to unlink socket %s",
addr->u.q_unix.data->path); } } qapi_free_SocketAddress(addr); }