Skip to content
Snippets Groups Projects
Commit eeea1faa authored by Hanna Reitz's avatar Hanna Reitz Committed by Kevin Wolf
Browse files

block: Fix leak in bdrv_create_file_fallback()


@options is leaked by the first two return statements in this function.

Note that blk_new_open() takes the reference to @options even on
failure, so all we need to do to fix the leak is to move the QDict
allocation down to where we actually need it.

Reported-by: Coverity (CID 1419884)
Fixes: fd17146c
       ("block: Generic file creation fallback")
Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
Message-Id: <20200225155618.133412-1-mreitz@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 81311255
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment