* src/remote/remote_driver.c (remoteGenericOpen): Help coverity.
---
src/remote/remote_driver.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 14c3d24..fcb4c14 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -2547,8 +2547,13 @@ remoteGenericOpen(virConnectPtr conn, virConnectAuthPtr auth,
struct private_data *priv;
int ret;
ret = remoteOpenSecondaryDriver(conn, auth, flags, &priv);
- if (ret == VIR_DRV_OPEN_SUCCESS)
+ if (ret == VIR_DRV_OPEN_SUCCESS) {
*genericPrivateData = priv;
+ } else {
+ /* Coverity 5.3.0 missed that remoteOpenSecondaryDriver
+ * guarantees priv is clean on failure. */
+ sa_assert(!priv);
+ }
return ret;
}
}
--
1.7.4.4