0454f23 xen_common: Resolve Coverity USE_AFTER_FREE

Authored and Committed by John Ferlan 9 years ago
    xen_common: Resolve Coverity USE_AFTER_FREE
    
    There were two warnings in this module
    
      If the VIR_ALLOC_N(def->serials, 1) fails, then a virDomainChrDefFree(chr)
      is called and we jump to cleanup which makes the same call. Just remove
      the one after VIR_ALLOC_N()
    
      In the label "skipnic:" a virDomainNetDefFree(net) is made; however, if
      in going back to the top of the loop we jump back down to skipnic for any
      reason, the call will attempt to free an already freed structure since
      "net" was not passed by reference to virDomainNetDefFree().  Just set
      net = NULL in skipnic: to resolve the issue.
    
        
file modified
+2 -3