]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh-snapshot: Don't leak @then in cmdSnapshotList()
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 23 Aug 2021 12:08:10 +0000 (14:08 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 23 Aug 2021 12:52:15 +0000 (14:52 +0200)
commit6d7a16361b54d1ea8cb0ae15a4d4d90a6f282ce0
tree40b9f4c5948c692fa44a8f974c0171ed4cada0d4
parente431293d74eb102ef5733bdb5019fa883d953e8c
virsh-snapshot: Don't leak @then in cmdSnapshotList()

The variable is used inside a loop in which it's allocated in
each iteration. Bring it inside the loop so that g_autoptr()
kicks in each iteration.

Fixes: 3caa28dc50df7ec215713075d669b20bef6473a2
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-snapshot.c