Skip to content
Snippets Groups Projects
Commit ef56c08a authored by Dmitry Simonenko's avatar Dmitry Simonenko
Browse files

fix gh-571: sophia: memory leak issue

parent 4a86e139
No related branches found
No related tags found
No related merge requests found
...@@ -205,20 +205,16 @@ SophiaFactory::keydefCheck(struct key_def *key_def) ...@@ -205,20 +205,16 @@ SophiaFactory::keydefCheck(struct key_def *key_def)
void void
SophiaFactory::txnFinish(struct txn *txn) SophiaFactory::txnFinish(struct txn *txn)
{ {
/** /* @todo: multi-statement transactions */
* @todo: support multi-statement transactions
* here when sophia supports them. /* single-stmt case */
*/ if (txn->n_stmts == 1) {
struct txn_stmt *stmt = txn_stmt(txn);
/* single-stmt case: if (stmt->new_tuple) {
* /* 2 refs: iproto case */
* no need to unref tuple here, since it will be done by /* 3 refs: lua case */
* TupleGuard in execute_replace(). assert(stmt->new_tuple->refs >= 2);
*/ tuple_unref(stmt->new_tuple);
(void)txn; }
#if 0 }
struct txn_stmt *stmt = txn_stmt(txn);
if (stmt->new_tuple)
tuple_unref(stmt->new_tuple);
#endif
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment