qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

exec: fix memory leak in find_max_supported_pagesize()

The string returned by object_property_get_str() is dynamically allocated.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <152231458624.69730.1752893648612848392.stgit@bahia.lan>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

authored by

Greg Kurz and committed by
Eduardo Habkost
72a841d2 f184de75

+1
+1
exec.c
··· 1495 1495 mem_path = object_property_get_str(obj, "mem-path", NULL); 1496 1496 if (mem_path) { 1497 1497 long hpsize = qemu_mempath_getpagesize(mem_path); 1498 + g_free(mem_path); 1498 1499 if (hpsize < *hpsize_min) { 1499 1500 *hpsize_min = hpsize; 1500 1501 }