提交 65160f50 编写于 作者: J Jim Meyering

network/bridge_driver.c: avoid potential NULL-dereference

* src/network/bridge_driver.c (networkBuildDnsmasqArgv): Correct
test for NULL *argv.
上级 b6c87e3b
/* /*
* driver.c: core driver methods for managing qemu guests * 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 * Copyright (C) 2006 Daniel P. Berrange
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -513,7 +513,7 @@ networkBuildDnsmasqArgv(virConnectPtr conn, ...@@ -513,7 +513,7 @@ networkBuildDnsmasqArgv(virConnectPtr conn,
return 0; return 0;
no_memory: no_memory:
if (argv) { if (*argv) {
for (i = 0; (*argv)[i]; i++) for (i = 0; (*argv)[i]; i++)
VIR_FREE((*argv)[i]); VIR_FREE((*argv)[i]);
VIR_FREE(*argv); VIR_FREE(*argv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册