[libvirt PATCH] conf: use correct free function for virDomainDeviceDef
Peter Krempa
pkrempa at redhat.com
Wed Feb 5 07:24:37 UTC 2020
On Wed, Feb 05, 2020 at 01:26:11 +0100, Ján Tomko wrote:
> Simple g_autofree is not enough if we put allocated
> data into the device structure.
>
> Define the AUTOPTR_CLEANUP function and use it here.
>
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> Reported-by: Xu Yandong <xuyandong2 at huawei.com>
Ah, so this bug was actually introduced when adding the post parse and
validation callbacks, because otherwise it doesn't set anything in the
struct.
> ---
> src/conf/domain_conf.c | 2 +-
> src/conf/domain_conf.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Peter Krempa <pkrempa at redhat.com>
More information about the libvir-list
mailing list