[libvirt] [PATCH 08/19] qemu_command: use VIR_AUTOPTR for virJSONValue

Michal Privoznik mprivozn at redhat.com
Wed Aug 21 07:44:06 UTC 2019


On 8/20/19 2:59 PM, Ján Tomko wrote:
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
>   src/qemu/qemu_command.c | 30 ++++++++++--------------------
>   1 file changed, 10 insertions(+), 20 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 94a6ad546e..b5448a074f 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c


You can also modify qemuDiskSourceGetProps(). The 
virJSONValueObjectCreate() will steal @props and set it to NULL on 
success. So virJSONValueFree() can be called safely there too.

Michal




More information about the libvir-list mailing list