[libvirt] [PATCH] Remove useless NULL check in virSecurityManagerGenLabel

2014-04-02 Thread Ján Tomko
Every security driver has domainGenSecurityLabel defined. Coverity complains about a possible leak of seclabel if !sec_managers[i]-drv-domainGenSecurityLabel is true and the seclabel might be overwritten by the next iteration of the loop. --- src/security/security_manager.c | 28

Re: [libvirt] [PATCH] Remove useless NULL check in virSecurityManagerGenLabel

2014-04-02 Thread Eric Blake
On 04/02/2014 06:44 AM, Ján Tomko wrote: Every security driver has domainGenSecurityLabel defined. As currently written. But Dan wrote the manager to be flexible to future drivers that omit obvious functions. This patch makes sense for silencing Coverity, but I think it is incomplete unless

Re: [libvirt] [PATCH] Remove useless NULL check in virSecurityManagerGenLabel

2014-04-02 Thread Daniel P. Berrange
On Wed, Apr 02, 2014 at 07:00:09AM -0600, Eric Blake wrote: On 04/02/2014 06:44 AM, Ján Tomko wrote: Every security driver has domainGenSecurityLabel defined. As currently written. But Dan wrote the manager to be flexible to future drivers that omit obvious functions. This patch makes

Re: [libvirt] [PATCH] Remove useless NULL check in virSecurityManagerGenLabel

2014-04-02 Thread Ján Tomko
On 04/02/2014 03:00 PM, Eric Blake wrote: On 04/02/2014 06:44 AM, Ján Tomko wrote: Every security driver has domainGenSecurityLabel defined. As currently written. But Dan wrote the manager to be flexible to future drivers that omit obvious functions. This patch makes sense for silencing