[libvirt] [PATCH] bridge: Fix uninitialized variable
Laine Stump
laine at laine.org
Fri Dec 24 02:39:07 UTC 2010
On 12/23/2010 05:14 PM, Jiri Denemark wrote:
> ---
> Pushed under the build-breaker rule.
>
> src/util/bridge.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/util/bridge.c b/src/util/bridge.c
> index dcd3f39..81a043c 100644
> --- a/src/util/bridge.c
> +++ b/src/util/bridge.c
> @@ -676,7 +676,7 @@ brAddInetAddress(brControl *ctl ATTRIBUTE_UNUSED,
> virSocketAddr *addr,
> unsigned int prefix)
> {
> - virCommandPtr cmd;
> + virCommandPtr cmd = NULL;
> char *addrstr;
> int ret = -1;
>
> @@ -715,7 +715,7 @@ brDelInetAddress(brControl *ctl ATTRIBUTE_UNUSED,
> virSocketAddr *addr,
> unsigned int prefix)
> {
> - virCommandPtr cmd;
> + virCommandPtr cmd = NULL;
> char *addrstr;
> int ret = -1;
>
Wow! How did I miss *that*?!?
Thanks for catching it!
(Beyond that - what options are you using that it didn't build? I can't
imagine that you actually encountered this at runtime, since in practice
the addresses passed to these functions have already been qualified, so
the only real-world time this would happen is if you were out of memory).
More information about the libvir-list
mailing list