]> git.ipfire.org Git - thirdparty/systemd.git/commit
vmspawn-qmp: take temporary ref in drive_info_add_fail 41951/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Tue, 5 May 2026 12:55:54 +0000 (13:55 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 5 May 2026 13:39:38 +0000 (14:39 +0100)
commit5eb256c99b309a86f7836a8397622662376b50f7
tree046093501c420adfe8d3459d27f4baf6b5f65b0c
parent83436d4b7e9e2514bb32b89765ce33ad57f53224
vmspawn-qmp: take temporary ref in drive_info_add_fail

drive_info_add_fail() calls bridge_unregister_drive() followed by
drive_info_unref(), then continues to access the DriveInfo object.
While all current callers hold their own reference, it is a bit
fragile and it trips static analyzers. Take a local reference.

CID#1655804

Follow-up for 1d0a8e5dbd267c803e100d9030d70d327eddf8b1
src/vmspawn/vmspawn-qmp.c