rbd: Fix use after free in rbd_open()
authorKevin Wolf <kwolf@redhat.com>
Thu, 25 Apr 2013 13:59:27 +0000 (15:59 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 26 Apr 2013 11:26:28 +0000 (13:26 +0200)
commitc3ca988d2b0ee94dc8d53eff4b1c2de4ac06a270
treed9452975ab8a2a00d27c3d61d39c3d7d6261c136
parent8ec7d390b0d50b5e5b4b1d8dba7ba40d64a70875
rbd: Fix use after free in rbd_open()

Commit a9ccedc3 frees the QemuOpts for the driver-specific options
immediately, even though it still needs the filename string that is
contained there. This doesn't work. Move the deletion of the QemuOpts to
the end of the function where its content isn't needed any more.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/rbd.c