From af9af3e21d307b5de2cdb69aecb3b8b5e7505cbc Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Thu, 15 Jul 2010 18:04:10 -0700 Subject: [PATCH] ovs-vsctl: Fix unitialized variables. The compiler pointed out two variables that it thought were used without being initialized. The first was just a spurious warning but the second could result in an unitialized pointer being freed. This fixes both of those issues. --- utilities/ovs-vsctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 0f862313..1ff21360 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -2654,7 +2654,7 @@ is_condition_satified(const struct vsctl_table_class *table, const char *operator; unsigned int idx; char *error; - int cmp; + int cmp = 0; error = parse_column_key_value(arg, table, &column, &key_string, &operator, operators, ARRAY_SIZE(operators), @@ -2787,7 +2787,7 @@ do_vsctl(const char *args, struct vsctl_command *commands, size_t n_commands, const char *unused; struct vsctl_command *c; int64_t next_cfg = 0; - char *error; + char *error = NULL; txn = the_idl_txn = ovsdb_idl_txn_create(idl); if (dry_run) { -- 2.30.2