summaryrefslogtreecommitdiff
path: root/ovsdb/mutation.c
diff options
context:
space:
mode:
Diffstat (limited to 'ovsdb/mutation.c')
-rw-r--r--ovsdb/mutation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ovsdb/mutation.c b/ovsdb/mutation.c
index 03d1c3499..cbc71bc49 100644
--- a/ovsdb/mutation.c
+++ b/ovsdb/mutation.c
@@ -287,6 +287,8 @@ mutate_scalar(const struct ovsdb_type *dst_type, struct ovsdb_datum *dst,
struct ovsdb_error *error;
unsigned int i;
+ ovsdb_datum_unshare(dst, dst_type);
+
if (base->type == OVSDB_TYPE_INTEGER) {
int64_t y = arg->integer;
for (i = 0; i < dst->n; i++) {
@@ -322,7 +324,7 @@ mutate_scalar(const struct ovsdb_type *dst_type, struct ovsdb_datum *dst,
}
}
- error = ovsdb_datum_sort(dst, dst_type->key.type);
+ error = ovsdb_datum_sort(dst, dst_type);
if (error) {
ovsdb_error_destroy(error);
return ovsdb_error("constraint violation",