aboutsummaryrefslogtreecommitdiff
path: root/ovsdb
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-03-22 13:24:23 -0700
committerBen Pfaff <blp@nicira.com>2012-03-23 10:15:05 -0700
commitf7f53d381d2c271185357682741e833d67d5508d (patch)
tree006b708148e2e888ab5ebab45e6ffec5ff75d8ec /ovsdb
parentf67f13545ebe61e02dc3aee98b60dc362f96946c (diff)
ovsdb-idlc: Fix memory leak in "optional bool" columns.
Commit 1bf2c9096858 (idl: Generalize special case boolean exception.) changed the IDL to do dynamic allocation with (x)malloc() for optional booleans, but it didn't add the corresponding calls to free(). This commit fixes the problem. Bug #10357. Reported-by: Paul Ingram <paul@nicira.com> Reported-by: Krishna Miriyala <krishna@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb')
-rwxr-xr-xovsdb/ovsdb-idlc.in10
1 files changed, 1 insertions, 9 deletions
diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index 0ee5c6b1..dfde735a 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -336,15 +336,7 @@ static void
# Unparse functions.
for columnName, column in sorted(table.columns.iteritems()):
type = column.type
- if (type.key.type == ovs.db.types.BooleanType and not type.value
- and type.n_min == 0 and type.n_max == 1):
- print '''
-static void
-%(s)s_unparse_%(c)s(struct ovsdb_idl_row *row OVS_UNUSED)
-{
- /* Nothing to do. */
-}''' % {'s': structName, 'c': columnName}
- elif (type.n_min != 1 or type.n_max != 1) and not type.is_optional_pointer():
+ if (type.n_min != 1 or type.n_max != 1) and not type.is_optional_pointer():
print '''
static void
%(s)s_unparse_%(c)s(struct ovsdb_idl_row *row_)