Skip to content
Commit fc06b430 authored by Stefan Hajnoczi's avatar Stefan Hajnoczi Committed by Michael Roth
Browse files

rbd: avoid qemu_rbd_snap_list() memory leaks



When there are no snapshots qemu_rbd_snap_list() returns 0 and the
snapshot table pointer is NULL.  Don't forget to free the snaps buffer
we allocated for librbd rbd_snap_list().

When the function succeeds don't forget to free the snaps buffer after
calling rbd_snap_list_end().

Cc: qemu-stable@nongnu.org
Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
(cherry picked from commit 9e6337d0)

Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent 6bbb9d81
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment