]> git.ipfire.org Git - thirdparty/qemu.git/commit - block.c
block: fix dangling bs->explicit_options in block.c
authorManos Pitsidianakis <el13635@mail.ntua.gr>
Fri, 14 Jul 2017 14:35:47 +0000 (17:35 +0300)
committerKevin Wolf <kwolf@redhat.com>
Tue, 1 Aug 2017 16:09:33 +0000 (18:09 +0200)
commit998cbd6a44cd96044f56713274bdf6a94cd721c0
tree99a0ad9848071b96050e36914d96ac6570ab4958
parentb81b74bfb2ea3d23dc06cb0c84841dbea201b8de
block: fix dangling bs->explicit_options in block.c

In some error paths it is possible to QDECREF a freed dangling
explicit_options, resulting in a heap overflow crash.  For example
bdrv_open_inherit()'s fail unrefs it, then calls bdrv_unref which calls
bdrv_close which also unrefs it.

Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c