aboutsummaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-03-27 14:09:14 -0700
committerBen Pfaff <blp@nicira.com>2012-03-28 14:54:48 -0700
commite49190c4933bdb4219c7fe5fb84768a076a1ff75 (patch)
tree3e80204e4a93a14357d4180d45ec2bf1b2a53a41 /ovsdb
parente787d2f427266b774f67a8f5d5c45e12cbc1687a (diff)
Fix minor memory leaks found by valgrind.
All of these leaks are in normally short-lived programs, so none of them is very important. Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb')
-rw-r--r--ovsdb/ovsdb-client.c9
-rw-r--r--ovsdb/ovsdb-tool.c4
2 files changed, 13 insertions, 0 deletions
diff --git a/ovsdb/ovsdb-client.c b/ovsdb/ovsdb-client.c
index 53da6ae2..077e3a8c 100644
--- a/ovsdb/ovsdb-client.c
+++ b/ovsdb/ovsdb-client.c
@@ -885,10 +885,15 @@ dump_table(const struct ovsdb_table_schema *ts, struct json_array *rows)
struct cell *cell = table_add_cell(&t);
cell->json = ovsdb_datum_to_json(&data[y][x], &columns[x]->type);
cell->type = &columns[x]->type;
+ ovsdb_datum_destroy(&data[y][x], &columns[x]->type);
}
+ free(data[y]);
}
table_print(&t, &table_style);
table_destroy(&t);
+
+ free(data);
+ free(columns);
}
static void
@@ -957,6 +962,10 @@ do_dump(struct jsonrpc *rpc, const char *database,
dump_table(ts, &rows->u.array);
}
+
+ jsonrpc_msg_destroy(reply);
+ free(tables);
+ ovsdb_schema_destroy(schema);
}
static void
diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c
index ecf998b3..e83b49a1 100644
--- a/ovsdb/ovsdb-tool.c
+++ b/ovsdb/ovsdb-tool.c
@@ -252,6 +252,10 @@ compact_or_convert(const char *src_name, const char *dst_name,
}
lockfile_unlock(dst_lock);
+
+ if (in_place) {
+ free((char *) dst_name);
+ }
}
static void