g_memdup() is deprecated since GLib 2.68. Use g_memdup2() instead.

Signed-off-by: Cédric Le Goater <[email protected]>
---
 hw/vfio/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 9a3e960126ea..2fe8688bbb6a 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -1225,7 +1225,7 @@ static void vfio_add_ext_cap(VFIOPCIDevice *vdev, bool 
ats_needed)
      * physical device, we cache the config space to avoid overwriting
      * the original config space when we parse the extended capabilities.
      */
-    config = g_memdup(pdev->config, vdev->config_size);
+    config = g_memdup2(pdev->config, vdev->config_size);
 
     /*
      * Extended capabilities are chained with each pointing to the next, so we
-- 
2.56.0


Reply via email to