static int kdbus_hello(bool bus_type, uint64_t hello_flags, uint64_t attach_flags_send, uint64_t attach_flags_recv)
{
struct kdbus_cmd_hello cmd;
+ struct kdbus_cmd_free cmd_free;
int fd = g_conn[bus_type].fd;
cmd.size = sizeof(cmd);
if (MAP_FAILED == (g_conn[bus_type].pool = mmap(NULL, KDBUS_POOL_SIZE, PROT_READ, MAP_SHARED, fd, 0)))
return -errno;
+ cmd_free.offset = cmd.offset;
+ cmd_free.size = sizeof(struct kdbus_cmd_free);
+ ioctl(g_conn[bus_type].fd, KDBUS_CMD_FREE, &cmd_free);
return 0;
}