1. 30 11月, 2012 8 次提交
    • J
      conf: fix uninitialized variable in virDomainListSnapshots · 892582f9
      Ján Tomko 提交于
      If allocation of names fails, list is uninitialized.
      892582f9
    • J
      rpc: don't destroy xdr before creating it in virNetMessageEncodeHeader · 6e1fc355
      Ján Tomko 提交于
      On OOM, xdr_destroy got called even though it wasn't created yet.
      
      Found by coverity:
      Error: UNINIT (CWE-457):
          libvirt-0.10.2/src/rpc/virnetmessage.c:214: var_decl: Declaring
          variable "xdr" without initializer.
          libvirt-0.10.2/src/rpc/virnetmessage.c:219: cond_true: Condition
          "virReallocN(&msg->buffer, 1UL /* sizeof (*msg->buffer) */,
          msg->bufferLength) < 0", taking true branch
          libvirt-0.10.2/src/rpc/virnetmessage.c:221: goto: Jumping to label
          "cleanup"
          libvirt-0.10.2/src/rpc/virnetmessage.c:257: label: Reached label
          "cleanup"
          libvirt-0.10.2/src/rpc/virnetmessage.c:258: uninit_use: Using
          uninitialized value "xdr.x_ops".
      6e1fc355
    • J
      virsh: do timing even for unusable connections · 8b235d40
      Ján Tomko 提交于
      Time values were uninitialized if the connection wasn't usable.
      8b235d40
    • J
      virsh: use correct sizeof when allocating cpumap · dc04b2a7
      Ján Tomko 提交于
      Found by coverity:
      Error: SIZEOF_MISMATCH (CWE-569):
          libvirt-0.10.2/tools/virsh-domain.c:4754: suspicious_sizeof: Passing
          argument "8UL /* sizeof (cpumap) */" to function
          "_vshCalloc(vshControl *, size_t, size_t, char const *, int)" and
          then casting the return value to "unsigned char *" is suspicious.
      
      Error: SIZEOF_MISMATCH (CWE-569):
          libvirt-0.10.2/tools/virsh-domain.c:4942: suspicious_sizeof: Passing
          argument "8UL /* sizeof (cpumap) */" to function
          "_vshCalloc(vshControl *, size_t, size_t, char const *, int)" and
          then casting the return value to "unsigned char *" is suspicious.
      dc04b2a7
    • J
      util: fix virBitmap allocation in virProcessInfoGetAffinity · 7730257d
      Ján Tomko 提交于
      Found by coverity:
      Error: REVERSE_INULL (CWE-476):
          libvirt-0.10.2/src/util/processinfo.c:141: deref_ptr: Directly
          dereferencing pointer "map".
          libvirt-0.10.2/src/util/processinfo.c:142: check_after_deref:
          Null-checking "map" suggests that it may be null, but it has already
          been dereferenced on all paths leading to the check.
      7730257d
    • J
      conf: fix NULL check in virNetDevBandwidthParse · d5e88425
      Ján Tomko 提交于
      Found by coverity:
      Error: REVERSE_INULL (CWE-476):
          libvirt-0.10.2/src/conf/netdev_bandwidth_conf.c:99: deref_ptr:
          Directly dereferencing pointer "node".
          libvirt-0.10.2/src/conf/netdev_bandwidth_conf.c:107:
          check_after_deref: Null-checking "node" suggests that it may be
          null, but it has already been dereferenced on all paths leading to
          the check.
      d5e88425
    • D
      Turn some dual-state int parameters into booleans · f4ea67f5
      Daniel P. Berrange 提交于
      The virStateInitialize method and several cgroups methods were
      using an 'int privileged' parameter or similar for dual-state
      values. These are better represented with the bool type.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      f4ea67f5
    • D
      Introduce a 'stop' method to virDriverState · d442ee23
      Daniel P. Berrange 提交于
      To allow actions to be performed in libvirtd when the host
      shuts down, or user session exits, introduce a 'stop'
      method to virDriverState. This will do things like saving
      the VM state to a file.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d442ee23
  2. 29 11月, 2012 22 次提交
  3. 28 11月, 2012 10 次提交