block/amend: Keep strong reference to BDS
authorHanna Reitz <hreitz@redhat.com>
Fri, 4 Mar 2022 15:37:28 +0000 (16:37 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 4 Mar 2022 17:18:26 +0000 (18:18 +0100)
commit78fa41fc671eae51fd3390a12a041d1c4a241c66
tree9a3ea923dffd6d3f15e0cbb080d6d5b6cb3ac82c
parentb8ba60067bf9df0f2e799b34eb00809f5d1e5989
block/amend: Keep strong reference to BDS

Otherwise, the BDS might be freed while the job is running, which would
cause a use-after-free.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220304153729.711387-5-hreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/amend.c