OSDN Git Service

block: Fix Transaction leak in bdrv_root_attach_child()
authorKevin Wolf <kwolf@redhat.com>
Mon, 3 May 2021 11:05:54 +0000 (13:05 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 18 May 2021 09:08:13 +0000 (11:08 +0200)
commite878bb1293d2cd0082550b320c3ccf245d0a69d4
tree63b198f443afdcb7da527d1508836f50f5ee8a31
parent38b440964736a5fca2c95606ce3efaa35381fa9d
block: Fix Transaction leak in bdrv_root_attach_child()

The error path needs to call tran_finalize(), too.

Fixes: CID 1452773
Fixes: 548a74c0dbc858edd1a7ee3045b5f2fe710bd8b1
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20210503110555.24001-2-kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c