network/bridge_driver.c: avoid potential NULL-dereference

* src/network/bridge_driver.c (networkBuildDnsmasqArgv): Correct
test for NULL *argv.
This commit is contained in:
Jim Meyering 2010-01-05 15:48:42 +01:00
parent b6c87e3b7a
commit 65160f50be
1 changed files with 2 additions and 2 deletions

View 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);