rpc: Add coverity[dead_error_begin] tag

Coverity misses the nuance of VIR_FREE(privkey) setting privkey = NULL when
if (!(virFileExists(privkey))) is true and thus declares the code dead.
This commit is contained in:
John Ferlan
2013-01-22 16:59:45 +01:00
committed by Michal Privoznik
parent 8b55992f4e
commit 28cd3dc40b
+1
View File
@@ -430,6 +430,7 @@ virNetClientPtr virNetClientNewLibSSH2(const char *host,
VIR_FREE(privkey);
/* DSA */
if (!privkey) {
/* coverity[dead_error_begin] */
virBufferAsprintf(&buf, "%s/.ssh/id_dsa", homedir);
if (!(privkey = virBufferContentAndReset(&buf)))
goto no_memory;