On Sat, Aug 06, 2016 at 05:46:29PM -0500, Ryan Moats wrote:
> This patchset mimics the changes introduced in
> 
>   f199df26 (ovsdb-idl: Add partial map updates functionality.)
>   010fe7ae (ovsdb-idlc.in: Autogenerate partial map updates functions.)
>   7251075c (tests: Add test for partial map updates.)
> 
> but for columns that store sets of values rather than key-value
> pairs.  These columns will now be able to use the OVSDB mutate
> operation to transmit deltas on the wire rather than use
> verify/update and transmit wait/update operations on the wire.
> 
> Side effect of modifying the comments in the partial map update
> tests.
> 
> Signed-off-by: Ryan Moats <rmo...@us.ibm.com>

This missed out on some of the fixes in:

    b1048e6a (ovsdb-idl: Fix issues detected in Partial Map Update feature)

so I folded in the following also, and applied this to master.

Most of the code in ovsdb-set-op.[ch] is in fact copied straight from
ovsdb-map-op.[ch], but the copyright notice was changed to say IBM
instead of HPE.  It's appropriate to *add* a copyright notice when you
copy code and modify it, but the existing notices should be maintained.
I don't like to mess with copyright notices without permission, so I
left them as-is, but I suggest that you should submit a patch to add in
the HPE notices.

Thank you!

--8<--------------------------cut here-------------------------->8--

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index 18c910e..0c91239 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -3771,6 +3771,7 @@ ovsdb_idl_txn_write_partial_set(const struct 
ovsdb_idl_row *row_,
 
     if (!is_valid_partial_update(row, column, datum)) {
         ovsdb_datum_destroy(datum, &column->type);
+        free(datum);
         return;
     }
 
@@ -3796,6 +3797,7 @@ ovsdb_idl_txn_delete_partial_set(const struct 
ovsdb_idl_row *row_,
         struct ovsdb_type type_ = column->type;
         type_.value.type = OVSDB_TYPE_VOID;
         ovsdb_datum_destroy(datum, &type_);
+        free(datum);
         return;
     }
     ovsdb_idl_txn_add_set_op(row, column, datum, SET_OP_DELETE);
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to