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:
parent
8b55992f4e
commit
28cd3dc40b
@ -430,6 +430,7 @@ virNetClientPtr virNetClientNewLibSSH2(const char *host,
|
|||||||
VIR_FREE(privkey);
|
VIR_FREE(privkey);
|
||||||
/* DSA */
|
/* DSA */
|
||||||
if (!privkey) {
|
if (!privkey) {
|
||||||
|
/* coverity[dead_error_begin] */
|
||||||
virBufferAsprintf(&buf, "%s/.ssh/id_dsa", homedir);
|
virBufferAsprintf(&buf, "%s/.ssh/id_dsa", homedir);
|
||||||
if (!(privkey = virBufferContentAndReset(&buf)))
|
if (!(privkey = virBufferContentAndReset(&buf)))
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user