A new transaction is allocated before executing the command. If the
result from committing the transaction is TRY_AGAIN, the code leaked
the allocated transaction since it creates a new one when it comes
back around to retry. The old transaction is now destroyed before
continuing to allow the command to be retried.
Signed-off-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs_cmdl_run_command(&ctx, get_all_commands());
txn_status = ovsdb_idl_txn_commit_block(nb_ctx.txn);
if (txn_status == TXN_TRY_AGAIN) {
+ ovsdb_idl_txn_destroy(nb_ctx.txn);
+ nb_ctx.txn = NULL;
continue;
} else {
break;