revision-id: 36a6787c2bdea95eb3399949a1218a6f7014e6b8 (mariadb-10.0.35-50-g36a6787) parent(s): cc8772f33e8f94844e32f3aa79e5f41d784f8ec0 author: Vicențiu Ciorbaru committer: Vicențiu Ciorbaru timestamp: 2018-06-26 19:39:18 +0300 message: Fix uninitialized variable warning in spider 'error_num' is used uninitialized whenever 'if' condition is true. Make sure to report out of memory properly. --- storage/spider/spd_table.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 265c64f..0302665 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -6670,8 +6670,10 @@ int spider_db_init( &spider_udf_table_mon_list_hash, sizeof(HASH) * spider_param_udf_table_mon_mutex_count(), NullS)) - ) + ) { + error_num = HA_ERR_OUT_OF_MEM; goto error_alloc_mon_mutxes; + } for (roop_count = 0; roop_count < (int) spider_param_udf_table_mon_mutex_count();