1. 28 1月, 2019 1 次提交
    • M
      lib: Use more of VIR_STEAL_PTR() · 5772885d
      Michal Privoznik 提交于
      We have this very handy macro called VIR_STEAL_PTR() which steals
      one pointer into the other and sets the other to NULL. The
      following coccinelle patch was used to create this commit:
      
        @ rule1 @
        identifier a, b;
        @@
      
        - b = a;
          ...
        - a = NULL;
        + VIR_STEAL_PTR(b, a);
      
      Some places were clean up afterwards to make syntax-check happy
      (e.g. some curly braces were removed where the body become a one
      liner).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      5772885d
  2. 27 1月, 2019 3 次提交
  3. 26 1月, 2019 2 次提交
  4. 25 1月, 2019 28 次提交
  5. 24 1月, 2019 6 次提交
    • M
      domain_conf: Free egl render node in virDomainGraphicsDefFree · ca768886
      Michal Privoznik 提交于
       13 bytes in 1 blocks are definitely lost in loss record 44 of 179
          at 0x4C2EE6F: malloc (vg_replace_malloc.c:299)
          by 0x9514A69: strdup (in /lib64/libc-2.27.so)
          by 0x5E60C0B: virStrdup (virstring.c:956)
          by 0x54C856F: virHostGetDRMRenderNode (qemuxml2argvmock.c:190)
          by 0x57CB4E3: qemuProcessGraphicsSetupRenderNode (qemu_process.c:4860)
          by 0x57CB571: qemuProcessSetupGraphics (qemu_process.c:4881)
          by 0x57CE01B: qemuProcessPrepareDomain (qemu_process.c:6040)
          by 0x57D102E: qemuProcessCreatePretendCmd (qemu_process.c:6975)
          by 0x114C1C: testCompareXMLToArgv (qemuxml2argvtest.c:611)
          by 0x134B90: virTestRun (testutils.c:174)
          by 0x123478: mymain (qemuxml2argvtest.c:1697)
          by 0x136BFA: virTestMain (testutils.c:1112)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      ca768886
    • M
      virpci: Fix memleak in virPCIDeviceIterDevices · f2476cac
      Michal Privoznik 提交于
      This partially reverts 00dc991c.
      
       2,030 (1,456 direct, 574 indirect) bytes in 14 blocks are definitely lost in loss record 77 of 80
          at 0x4C30E96: calloc (vg_replace_malloc.c:711)
          by 0x50F83AA: virAlloc (viralloc.c:143)
          by 0x5178DFA: virPCIDeviceNew (virpci.c:1753)
          by 0x51753E9: virPCIDeviceIterDevices (virpci.c:468)
          by 0x5175EB5: virPCIDeviceGetParent (virpci.c:759)
          by 0x517AB55: virPCIDeviceIsBehindSwitchLackingACS (virpci.c:2476)
          by 0x517AC24: virPCIDeviceIsAssignable (virpci.c:2494)
          by 0x10BF27: testVirPCIDeviceIsAssignable (virpcitest.c:229)
          by 0x10D14C: virTestRun (testutils.c:174)
          by 0x10C535: mymain (virpcitest.c:422)
          by 0x10F1B6: virTestMain (testutils.c:1112)
          by 0x10CF93: main (virpcitest.c:455)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      f2476cac
    • M
      virPCIGetNetName: Initialize @netname to NULL · 6a8c1749
      Michal Privoznik 提交于
      This is a return argument that is to be compared against NULL on
      successful return. However, it is not initialized and therefore
      relies on callers setting it to NULL prior calling the function.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      6a8c1749
    • E
      qemu: improve compile-time check of qemuBlockjobState mapping · 7b6116fb
      Eric Blake 提交于
      Asserting the value we set four lines earlier in qemuBlockjobState
      doesn't buy us any safety (if the public header adds a value, we end
      up skipping that value without the compiler warning us of our gap);
      what we really want is to assert that the value auto-assigned by the
      compiler matches the actual last value in the public headers (as was
      done below for qemuBlockJobType).  Add useful comments while at it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ACKed-by: NPeter Krempa <pkrempa@redhat.com>
      7b6116fb
    • J
      apparmor: convert libvirtd profile to a named profile · a3ab6d42
      Jim Fehlig 提交于
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      a3ab6d42
    • J
      apparmor: Add support for named profiles · 70c2933d
      Jim Fehlig 提交于
      Upstream apparmor is switching to named profiles. In short,
      
      /usr/sbin/dnsmasq {
      
      becomes
      
      profile dnsmasq /usr/sbin/dnsmasq {
      
      Consequently, any profiles that reference profiles in a peer= condition
      need to be updated if the referenced profile switches to a named profile.
      Apparmor commit 9ab45d81 switched dnsmasq to a named profile. ATM it is
      the only named profile switch that has affected libvirt. Add rules to the
      libvirtd profile to reference dnsmasq in peer= conditions by profile name.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      70c2933d