1. 17 7月, 2017 6 次提交
    • J
      nodedev: Use common naming for virnodedeviceobj · 14295427
      John Ferlan 提交于
      A virNodeDeviceObjPtr is an @obj
      
      A virNodeDeviceObjListPtr is an @devs
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      14295427
    • J
      test: Adjust cleanup/error paths for nodedev test APIs · c4ff1a18
      John Ferlan 提交于
       - In testDestroyVport rather than use a cleanup label, just return -1
         immediately since nothing else is needed.
      
       - In testStoragePoolDestroy, if !privpool, then just return -1 since
         nothing else will happen anyway.
      
       - Rather than "goto cleanup;" on failure to virNodeDeviceObjFindByName
         an @obj, just return directly.  This then allows the cleanup: label code
         to not have to check "if (obj)" before calling virNodeDeviceObjUnlock.
         This also simplifies some exit logic...
      
       - In testNodeDeviceObjFindByName use an error: label to handle the failure
         and don't do the ncaps++ within the VIR_STRDUP() source target index.
         Only increment ncaps after success. Easier on eyes at error label too.
      
       - In testNodeDeviceDestroy use "cleanup" rather than "out" for the goto
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      c4ff1a18
    • J
      nodedev: Alter virNodeDeviceObjRemove · 87e50c9c
      John Ferlan 提交于
      Rather than passing the object to be removed by reference, pass by value
      and then let the caller decide whether or not the object should be free'd
      and how to handle the logic afterwards. This includes free'ing the object
      and/or setting the local variable to NULL to prevent subsequent unexpected
      usage (via something like virNodeDeviceObjRemove in testNodeDeviceDestroy).
      
      For now this function will just handle the remove of the object from the
      list for which it was placed during virNodeDeviceObjAssignDef.
      
      This essentially reverts logic from commit id '61148074' that free'd the
      device entry on list, set *dev = NULL and returned. Thus fixing a bug in
      node_device_hal.c/dev_refresh() which would never call dev_create(udi)
      since @dev would have been set to NULL.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      87e50c9c
    • M
      qemu: Use the proper string in qemuBlock...JSONSocketAddress() · 90c27b8e
      Martin Kletzander 提交于
      Recent refactors made it so that the function may use uninitialized
      pointer, but it actually wanted to use a different variable and value
      at all.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      90c27b8e
    • J
      Revert "nwfilter: Move save of config until after successful assign" · dff020c9
      John Ferlan 提交于
      This reverts commit b3e71a88.
      
      As it turns out this ends up very badly as the @def could be Free'd
      even though it's owned by @obj as a result of the AssignDef.
      dff020c9
    • Z
      virpcimock: Fix memory leak in pci_driver_new · 3c3c3e36
      ZhiPeng Lu 提交于
      driverpath, allocated by virAsprintfQuiet, was not freed and leaked.
      Signed-off-by: NZhipeng Lu <lu.zhipeng@zte.com.cn>
      3c3c3e36
  2. 16 7月, 2017 9 次提交
  3. 15 7月, 2017 25 次提交