From: John Ferlan Date: Tue, 22 Jan 2013 14:41:00 +0000 (-0500) Subject: rpc: Add coverity[dead_error_begin] tag X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=28cd3dc40bf34061c5c89510ae2d2b91c49e9eab;p=libvirt.git 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. --- diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 44638e2bda..75509682be 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -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;