]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: handle failure to generate mdevctl cmd
authorJonathon Jongsma <jjongsma@redhat.com>
Tue, 20 Apr 2021 14:09:00 +0000 (09:09 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Mon, 26 Apr 2021 17:24:22 +0000 (12:24 -0500)
commit2d847765d289115d65c15203922f52a33de6c0be
tree8745258d4767619aa549531632cdd4f8c63b2915
parentd0913302a8590fce22b542eaea8966d5fefba47b
nodedev: handle failure to generate mdevctl cmd

Coverity complained that the 'default' case of the switch in
nodeDeviceGetMdevctlCommand() was falling through without initializing
'cmd'. Return NULL in this case even though it should never happen.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/node_device/node_device_driver.c