]> xenbits.xensource.com Git - libvirt.git/commit
libxl_driver.c: validate 'driverName' earlier in libxlNodeDeviceDetachFlags()
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Sat, 30 Jan 2021 16:59:06 +0000 (13:59 -0300)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 17 Feb 2021 18:53:00 +0000 (15:53 -0300)
commit04871c511e9bb2c2b6ff8561a07e1ad9c3082d5b
tree6c1c6b517ef7c3436057bdec00a8028d2ba2ed67
parentfc71d914287c22af2adb1fd6e11000d2a543917b
libxl_driver.c: validate 'driverName' earlier in libxlNodeDeviceDetachFlags()

The validation of 'driverName' does not depend on any other state and can be
done right on the start of the function. We can fail earlier while avoiding
a cleanup jump.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/libxl/libxl_driver.c