[ovs-dev] [PATCH] ovsdb: Fix memory leak in corner case in ovsdb_txn_commit_().

Yifeng Sun pkusunyifeng at gmail.com
Tue Dec 19 22:22:43 UTC 2017


Thanks for the fix.

Reviewed-by: Yifeng Sun <pkusunyifeng at gmail.com>


On Tue, Dec 19, 2017 at 2:20 PM, Ben Pfaff <blp at ovn.org> wrote:

> Reported-by: Yifeng Sun <pkusunyifeng at gmail.com>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
>  ovsdb/transaction.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/ovsdb/transaction.c b/ovsdb/transaction.c
> index 2e315804a19e..f47d45fca397 100644
> --- a/ovsdb/transaction.c
> +++ b/ovsdb/transaction.c
> @@ -814,6 +814,7 @@ ovsdb_txn_commit_(struct ovsdb_txn *txn, bool durable)
>       * was really a no-op. */
>      error = for_each_txn_row(txn, determine_changes);
>      if (error) {
> +        ovsdb_txn_abort(txn);
>          return OVSDB_WRAP_BUG("can't happen", error);
>      }
>      if (ovs_list_is_empty(&txn->txn_tables)) {
> --
> 2.10.2
>
>


More information about the dev mailing list