mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
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);
|
||||
/* DSA */
|
||||
if (!privkey) {
|
||||
/* coverity[dead_error_begin] */
|
||||
virBufferAsprintf(&buf, "%s/.ssh/id_dsa", homedir);
|
||||
if (!(privkey = virBufferContentAndReset(&buf)))
|
||||
goto no_memory;
|
||||
|
Loading…
x
Reference in New Issue
Block a user