ACRN:DM:VGPU: Free the memory after creating udmabuf

In course of creating the udmabuf, udmabuf_create_list is allocated and
passed to kernel. After the dmabuf is returned, it is not used
any more. Need to free it otherwises it will cause the memory leak.

Tracked-On: #7337
Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
This commit is contained in:
Zhao Yakui 2022-04-21 15:46:51 +08:00 committed by acrnsi-robot
parent 8b7767e643
commit 0873575a03

View File

@ -1026,6 +1026,7 @@ static struct dma_buf_info *virtio_gpu_create_udmabuf(struct virtio_gpu *gpu,
info->dmabuf_fd = dmabuf_fd;
atomic_store(&info->ref_count, 1);
}
free(list);
return info;
}