On 7/1/22 17:32, Ilya Maximets wrote: >> This doesn't look right, we can have: >> >> datum = ovsdb_datum_default(TYPE); /* refcnt = 1 */ >> ovsdb_datum_clone(datum, clone); /* refcnt = 2 */ >> datum2 = ovsdb_datum_default(TYPE); /* refcnt = 1 */ > Here the refcnt will still be 2, because the initialization > is executed only once (protected by !d->n check). > >> ovsdb_datum_unshare(clone, TYPE); /* refcnt = 0 */ > So, here the refcnt will become 1 again. Since users > are not supposed to destroy the non-cloned default datum, > that should work fine. Am I missing something? >
You're right, I missed the !d->n. Sorry for the noise. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
