[libvirt] [PATCH] virpci: Resolve coverity issues

2014-02-07 Thread John Ferlan
Coverity complains about USE_AFTER_FREE due to how virPCIDeviceSetStubDriver could return either -1, 0, or 1 from the VIR_STRDUP() and then possibly makes a call to virPCIDeviceDetach(). The only way this could happen is if NULL were passed as the driver name and virStrdup() returned 0. Since

Re: [libvirt] [PATCH] virpci: Resolve coverity issues

2014-02-07 Thread Eric Blake
On 02/07/2014 09:21 AM, John Ferlan wrote: Coverity complains about USE_AFTER_FREE due to how virPCIDeviceSetStubDriver could return either -1, 0, or 1 from the VIR_STRDUP() and then possibly makes a call to virPCIDeviceDetach(). The only way this could happen is if NULL were passed as the