]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
network/bridge_driver.c: avoid potential NULL-dereference
authorJim Meyering <meyering@redhat.com>
Tue, 5 Jan 2010 14:48:42 +0000 (15:48 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 7 Jan 2010 13:25:45 +0000 (14:25 +0100)
* src/network/bridge_driver.c (networkBuildDnsmasqArgv): Correct
test for NULL *argv.

src/network/bridge_driver.c

index abee78cbbf1d6025e302f999a0569d0bb0b1a433..69809b34c852f163b94f6977b3adadefcce8779c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * driver.c: core driver methods for managing qemu guests
  *
- * Copyright (C) 2006-2009 Red Hat, Inc.
+ * Copyright (C) 2006-2010 Red Hat, Inc.
  * Copyright (C) 2006 Daniel P. Berrange
  *
  * This library is free software; you can redistribute it and/or
@@ -513,7 +513,7 @@ networkBuildDnsmasqArgv(virConnectPtr conn,
     return 0;
 
  no_memory:
-    if (argv) {
+    if (*argv) {
         for (i = 0; (*argv)[i]; i++)
             VIR_FREE((*argv)[i]);
         VIR_FREE(*argv);