From: John Ferlan Date: Fri, 14 Mar 2014 10:26:40 +0000 (-0400) Subject: openvzRegister: Check for error return X-Git-Tag: v1.2.3-rc1~209 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=759ca3192f7a9f13c085801f6130754894c4f678;p=thirdparty%2Flibvirt.git openvzRegister: Check for error return 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 --- diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 393f397568..c10fa05d49 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; }