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

Re: [libvirt] [PATCH] conf: add missing break in virDomainAuditRedirdev



On 09/14/2011 02:02 PM, Marc-André Lureau wrote:
Also initialize to NULL a few variables that might get
free before being set.
---
  src/conf/domain_audit.c |    9 +++++----
  1 files changed, 5 insertions(+), 4 deletions(-)

+++ b/src/conf/domain_audit.c
@@ -250,8 +250,8 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
  {
      char uuidstr[VIR_UUID_STRING_BUFLEN];
      char *vmname;
-    char *address;
-    char *device;
+    char *address = NULL;
+    char *device = NULL;
      const char *virt;

Good catch - this plugs a crash on OOM.  ACK and pushed.

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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