From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id AF80544532A for ; Wed, 8 Jul 2020 18:14:31 +0300 (MSK) From: Aleksandr Lyapunov Date: Wed, 8 Jul 2020 18:14:17 +0300 Message-Id: <1594221263-6228-11-git-send-email-alyapunov@tarantool.org> In-Reply-To: <1594221263-6228-1-git-send-email-alyapunov@tarantool.org> References: <1594221263-6228-1-git-send-email-alyapunov@tarantool.org> Subject: [Tarantool-patches] [PATCH 10/16] tx: introduce txn_stmt_destroy List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org Cc: v.shpilevoy@tarantool.org From: Aleksandr Lyapunov --- src/box/txn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/box/txn.c b/src/box/txn.c index 5964ca7..2bd44a3 100644 --- a/src/box/txn.c +++ b/src/box/txn.c @@ -121,7 +121,7 @@ txn_stmt_new(struct region *region) } static inline void -txn_stmt_unref_tuples(struct txn_stmt *stmt) +txn_stmt_destroy(struct txn_stmt *stmt) { if (stmt->old_tuple != NULL) tuple_unref(stmt->old_tuple); @@ -169,7 +169,7 @@ txn_rollback_to_svp(struct txn *txn, struct stailq_entry *svp) assert(txn->n_applier_rows > 0); txn->n_applier_rows--; } - txn_stmt_unref_tuples(stmt); + txn_stmt_destroy(stmt); stmt->space = NULL; stmt->row = NULL; } @@ -208,7 +208,7 @@ txn_free(struct txn *txn) { struct txn_stmt *stmt; stailq_foreach_entry(stmt, &txn->stmts, next) - txn_stmt_unref_tuples(stmt); + txn_stmt_destroy(stmt); /* Truncate region up to struct txn size. */ region_truncate(&txn->region, sizeof(struct txn)); -- 2.7.4