X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fovsdb-data.c;h=58c2a10a076fc98936ea398c6b28b3ed42d07089;hb=be812f2d2b0c948e5f52017c4df79645809fcb90;hp=1781811917d2ee04df5f190da7622df3073a8e91;hpb=6a6f8d167357a1f1751cdd54b9491c531a371ae1;p=openvswitch diff --git a/lib/ovsdb-data.c b/lib/ovsdb-data.c index 17818119..58c2a10a 100644 --- a/lib/ovsdb-data.c +++ b/lib/ovsdb-data.c @@ -1,4 +1,4 @@ -/* 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. @@ -590,6 +590,7 @@ ovsdb_atom_from_string(union ovsdb_atom *atom, error = ovsdb_atom_check_constraints(atom, base); if (error) { + ovsdb_atom_destroy(atom, base->type); msg = ovsdb_error_to_string(error); ovsdb_error_destroy(error); } @@ -1687,6 +1688,9 @@ ovsdb_datum_includes_all(const struct ovsdb_datum *a, { size_t i; + if (a->n > b->n) { + return false; + } for (i = 0; i < a->n; i++) { if (ovsdb_datum_find(a, i, b, type) == UINT_MAX) { return false;