Skip to content

Commit f0da553

Browse files
committed
MYC-365: Remove Memory leak from mysqlx_result_next_warning()
1 parent 275af70 commit f0da553

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xapi/result.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ mysqlx_result_t::mysqlx_result_struct(mysqlx_stmt_t &parent, cdk::Reply &reply)
100100
m_row_proc(NULL),
101101
m_crud(parent),
102102
m_store_result(false),
103-
m_filter_mask(0)
103+
m_filter_mask(0),
104+
m_current_id_index(0)
104105
{
105106
init_result(true);
106107
}
@@ -546,7 +547,7 @@ mysqlx_error_t * mysqlx_result_t::get_next_warning()
546547
if (m_warning_iter->next())
547548
m_current_warning.reset(new mysqlx_error_t(m_warning_iter->entry().get_error(), true));
548549
else
549-
m_current_warning.release();
550+
m_current_warning.reset(NULL);
550551

551552
return m_current_warning.get();
552553
}

0 commit comments

Comments
 (0)