From 65160f50bea0756ebdb1945d7da624c7dc29e72d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 5 Jan 2010 15:48:42 +0100 Subject: [PATCH] network/bridge_driver.c: avoid potential NULL-dereference * src/network/bridge_driver.c (networkBuildDnsmasqArgv): Correct test for NULL *argv. --- src/network/bridge_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index abee78cbbf..69809b34c8 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -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);