[libvirt] [PATCH] openvzRegister: Check for error return
John Ferlan
jferlan at redhat.com
Fri Mar 14 10:45:59 UTC 2014
A recent change to openvz_driver.c caused Coverity to make additional
comparisons and find that the openvzRegister() was not checking the
status of virRegisterDriver() call like other callers and thus generated
a CHECKED_RETURN condition
Signed-off-by: John Ferlan <jferlan at redhat.com>
---
src/openvz/openvz_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 393f397..c10fa05 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -2239,6 +2239,7 @@ static virDriver openvzDriver = {
};
int openvzRegister(void) {
- virRegisterDriver(&openvzDriver);
+ if (virRegisterDriver(&openvzDriver) < 0)
+ return -1;
return 0;
}
--
1.8.5.3
More information about the libvir-list
mailing list