OSDN Git Service

rbd: Fix use after free in qemu_rbd_set_keypairs() error path
authorKevin Wolf <kwolf@redhat.com>
Fri, 16 Feb 2018 18:14:55 +0000 (19:14 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 9 Mar 2018 14:17:47 +0000 (15:17 +0100)
commit71c87815f9e0386b6f3e22942adc956fd603c82f
treeb7ac8b64528d2d434a6a6e173483eaad148fb32d
parentab8bda76a010261ac6df2fd6e0559c3589b6e847
rbd: Fix use after free in qemu_rbd_set_keypairs() error path

If we want to include the invalid option name in the error message, we
can't free the string earlier than that.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block/rbd.c