
On 12/03/2013 07:18 AM, John Ferlan wrote:
The storageRegister() didn't check the return from the virRegisterStorageDriver() like other callers did, so Coverity flagged it. Just check the return and handle.
Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/storage/storage_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
ACK.
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 3b4715a..469d135 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -2645,7 +2645,8 @@ static virStateDriver stateDriver = { };
int storageRegister(void) {
While touching this, you may want to fix the style to put the opening { on its own line.
- virRegisterStorageDriver(&storageDriver); + if (virRegisterStorageDriver(&storageDriver) < 0) + return -1; virRegisterStateDriver(&stateDriver); return 0; }
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org