Re: [PATCH 0/5] alloc: Don't mask use of uninitialized variables in VIR_FREE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Thursday in 2020, Peter Krempa wrote:
Neither GCC nor clang report warnings if pointer passed to VIR_FREE is
uninitialized. This is probably caused by our internal implementation
which mangles the pointer to it.

Fix all offenders and replace VIR_FREE's internals with g_clear_pointer.

Peter Krempa (5):
 virNetworkPortDefSaveStatus: Fix potentially uninitialized 'path' by
   refactoring cleanup
 virLXCProcessSetupNamespaceName: Fix potential uninitialized free of
   'path'
 cmdDomHostname: Fix uninitialized use of 'hostname' by refactoring
   cleanup
 testQemuMonitorJSONqemuMonitorJSONGetTargetArch: Fix uninitialized use
   of 'arch'
 VIR_ALLOC: Replace internals by g_clear_pointer

src/conf/virnetworkportdef.c | 19 +++++++------------
src/libvirt_private.syms     |  1 -
src/lxc/lxc_process.c        |  3 +--
src/util/viralloc.c          | 21 ++-------------------
src/util/viralloc.h          |  7 +------
tests/qemumonitorjsontest.c  | 14 +++++---------
tools/virsh-domain.c         | 18 ++++++------------
7 files changed, 22 insertions(+), 61 deletions(-)


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux