]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Detect heap allocation failure; factor out some duplication.
authorJim Meyering <meyering@redhat.com>
Fri, 30 Nov 2007 15:43:42 +0000 (15:43 +0000)
committerJim Meyering <meyering@redhat.com>
Fri, 30 Nov 2007 15:43:42 +0000 (15:43 +0000)
commitc3c80a183ee29d1512940d4a26bc6e9c719faeee
treefe0494003b50697c8e74295af4d63911cdfe1431
parent2ac691d60e09d73c3b3dec7499e7714e86a782ef
Detect heap allocation failure; factor out some duplication.

* qemud/qemud.c (tls_port, tcp_port, mdns_name, tls_allowed_ip_list):
  (tls_allowed_dn_list): Remove "const", now that we free these.
  (unix_sock_rw_mask): Rename from unix_sock_rw_perms, so that
  the latter name can be used as a local string variable, so that the
  variable name matches the config attribute name.
  (unix_sock_ro_mask): Rename from unix_sock_ro_perms, likewise.
  (remoteCheckDN, remoteCheckAccess): Adapt to const removal.
  (qemudDispatchServer): Check for heap allocation failure.
  (remoteConfigGetStringList): New function, based on code from Dan BerrangĂ©.
  (CHECK_TYPE): Remove macro.
  (checkType): New function.
  (GET_CONF_INT, GET_CONF_STR): New macros.
  (remoteReadConfigFile): Use new macros to avoid duplication and to
  check for allocation failure.
* src/conf.h (virConfTypeName): New static inline function.
ChangeLog
qemud/qemud.c
src/conf.h