X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ovsdb%2Fovsdb-tool.c;h=f680989677617ff9d263137c42225f3d7a19c0a0;hb=ca435eb9112e873853d3cf201ee3f0c5c76bf89f;hp=ad8cece2a17f4bee2b295d0c5ad7011146b715b4;hpb=e4476f74388c8d2eeed7738f26ca881ce5b8e96c;p=openvswitch diff --git a/ovsdb/ovsdb-tool.c b/ovsdb/ovsdb-tool.c index ad8cece2..f6809896 100644 --- a/ovsdb/ovsdb-tool.c +++ b/ovsdb/ovsdb-tool.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, 2011 Nicira Networks. + * Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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 @@ -260,8 +264,7 @@ do_compact(int argc, char *argv[]) const char *db = argc >= 2 ? argv[1] : default_db(); const char *target = argc >= 3 ? argv[2] : NULL; - compact_or_convert(db, target, NULL, - "compacted by ovsdb-tool "VERSION BUILDNR); + compact_or_convert(db, target, NULL, "compacted by ovsdb-tool "VERSION); } static void @@ -274,7 +277,7 @@ do_convert(int argc, char *argv[]) check_ovsdb_error(ovsdb_schema_from_file(schema, &new_schema)); compact_or_convert(db, target, new_schema, - "converted by ovsdb-tool "VERSION BUILDNR); + "converted by ovsdb-tool "VERSION); ovsdb_schema_destroy(new_schema); }