1. 16 10月, 2019 1 次提交
  2. 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
  3. 19 9月, 2018 1 次提交
  4. 25 9月, 2017 1 次提交
  5. 13 4月, 2017 1 次提交
    • W
      util: Fix resource leak · 123770cd
      Wang King 提交于
      The virRotatingFileWriterAppend method leaks the file->entry
      on the virRotatingFileWriterEntryNew failing path.
      123770cd
  6. 24 11月, 2016 1 次提交
  7. 05 12月, 2015 1 次提交
  8. 30 11月, 2015 2 次提交
  9. 26 11月, 2015 1 次提交
    • D
      util: add APIs for reading/writing from/to rotating files · 910e65d9
      Daniel P. Berrange 提交于
      Add virRotatingFileReader and virRotatingFileWriter objects
      which allow reading & writing from/to files with automation
      rotation to N backup files when a size limit is reached. This
      is useful for guest logging when a guaranteed finite size
      limit is required. Use of external tools like logrotate is
      inadequate since it leaves the possibility for guest to DOS
      the host in between invokations of logrotate.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      910e65d9