mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemu_monitor_json: Use g_autoptr() for virJSONValue
A lot of explicit free calls can be saved when virJSONValue variables are declared with g_autoptr(). There's one caveat: there was a slight deviation from our usual pattern such that @cmd variable was not initialized to NULL but as the very first step it was assigned a value using qemuMonitorJSONMakeCommand(). While this works in theory it upset my GCC-11.2 (but only when building with -O2). So I had to initialize the variable in such case too. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
parent
40bbcb47cc
commit
551f91b4cb
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user