1. 13 3月, 2020 11 次提交
  2. 12 3月, 2020 1 次提交
  3. 11 3月, 2020 9 次提交
  4. 10 3月, 2020 1 次提交
  5. 09 3月, 2020 12 次提交
  6. 07 3月, 2020 3 次提交
  7. 06 3月, 2020 3 次提交
    • M
      virthread: Free thread name only after worker has finished · 9b3b93c5
      Michal Privoznik 提交于
      When spawning a thread via our virThread APIs we let pthread
      spawn this helper thread which sets couple of thread local
      variables (e.g. thread job name or thread worker name) and as of
      v6.1.0-40-gc85256b3 it also sets pthread name (which is then
      visible in `ps' output for instance). Only after these steps the
      intended function is called. However, just before calling it we
      free the buffer that holds the thread name which results in
      invalid memory reads:
      
      ==47027== Invalid read of size 1
      ==47027==    at 0x48389C2: strlen (vg_replace_strmem.c:459)
      ==47027==    by 0x58BB3D6: __vfprintf_internal (vfprintf-internal.c:1645)
      ==47027==    by 0x58CE6E0: __vasprintf_internal (vasprintf.c:57)
      ==47027==    by 0x574BA28: g_vasprintf (in /usr/lib64/libglib-2.0.so.0.6000.7)
      ==47027==    by 0x57240CC: g_strdup_vprintf (in /usr/lib64/libglib-2.0.so.0.6000.7)
      ==47027==    by 0x48E0EFA: vir_g_strdup_vprintf (glibcompat.c:209)
      ==47027==    by 0x493AA05: virLogVMessage (virlog.c:573)
      ==47027==    by 0x493A8FE: virLogMessage (virlog.c:513)
      ==47027==    by 0x4992FC7: virThreadJobClear (virthreadjob.c:121)
      ==47027==    by 0x4992844: virThreadHelper (virthread.c:237)
      ==47027==    by 0x5817496: start_thread (pthread_create.c:486)
      ==47027==    by 0x59563CE: clone (clone.S:95)
      
      The problem is that neither virThreadJobSetWorker() nor
      virThreadJobSet() create a copy of passed name. They just set a
      thread local variable to point to the buffer which is then
      freed. Moving the free towards the end of the wrapper function
      solves the issue.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      9b3b93c5
    • D
      test: fix leak of authentication info · 579f0235
      Daniel P. Berrangé 提交于
      The 'auths' struct in the test driver was not free()d. This was easy to
      miss because the default XML doesn't include auth info.
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      579f0235
    • J
      aa-helper: use g_autofree in create_profile · 4a10db14
      Ján Tomko 提交于
      'template' might be used uninitialized.
      
      Use g_autofree for everything and remove all the custom labels.
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
      4a10db14