On Thu, 4 Dec 2025 at 16:22, Dorinda Bassey <[email protected]> wrote:
>
> In `virtio_add_resource` function, the UUID used as a key for
> `g_hash_table_insert` was temporary, which could lead to
> invalid lookups when accessed later. This patch ensures that
> the UUID remains valid by duplicating it into a newly allocated
> memory space. The value is then inserted into the hash table
> with this persistent UUID key to ensure that the key stored in
> the hash table remains valid as long as the hash table entry
> exists.
>
> Fixes: faefdba847 ("hw/display: introduce virtio-dmabuf")
> Signed-off-by: Dorinda Bassey <[email protected]>
> Reviewed-by: Stefano Garzarella <[email protected]>
> Reviewed-by: Albert Esteve <[email protected]>
> Reviewed-by: Marc-AndrĂ© Lureau <[email protected]>
> ---
> v3: removed blank line between trailers
>
>  hw/display/virtio-dmabuf.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>

Reviewed-by: Jim MacArthur <[email protected]>

Reply via email to