Skip to content

Commit 92162e6

Browse files
Daniele SciasciaNirbhay Choubey
authored andcommitted
MW-175 Fix definitively lost memory in wsrep_get_params
1 parent 137af55 commit 92162e6

File tree

3 files changed

+2
-111
lines changed

3 files changed

+2
-111
lines changed

mysql-test/valgrind.supp

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,25 +1228,6 @@
12281228
fun:dlopen@@GLIBC_2.2.5
12291229
}
12301230

1231-
{
1232-
GitHub codership/mysql-wsrep#176
1233-
Memcheck:Leak
1234-
fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
1235-
fun:galera_parameters_get
1236-
fun:_ZL24refresh_provider_optionsv
1237-
fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
1238-
fun:_ZN7sys_var6updateEP3THDP7set_var
1239-
fun:_ZN7set_var6updateEP3THD
1240-
fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
1241-
fun:_Z21mysql_execute_commandP3THD
1242-
fun:_Z11mysql_parseP3THDPcjP12Parser_state
1243-
fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
1244-
fun:_Z16dispatch_command19enum_server_commandP3THDPcj
1245-
fun:_Z10do_commandP3THD
1246-
fun:_Z24do_handle_one_connectionP3THD
1247-
fun:handle_one_connection
1248-
}
1249-
12501231
{
12511232
GitHub codership/galera#330
12521233
Memcheck:Leak
@@ -1340,31 +1321,6 @@ g codership/mysql-wsrep/issues#176
13401321
fun:_Z16wsrep_set_paramsRN6galera10ReplicatorEPKc
13411322
}
13421323

1343-
{
1344-
codership/mysql-wsrep/issues#176
1345-
Memcheck:Leak
1346-
fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
1347-
}
1348-
1349-
{
1350-
codership/mysql-wsrep/issues#176
1351-
Memcheck:Leak
1352-
fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
1353-
fun:galera_parameters_get
1354-
fun:_ZL24refresh_provider_optionsv
1355-
fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type
1356-
fun:_ZN7sys_var6updateEP3THDP7set_var
1357-
fun:_ZN7set_var6updateEP3THD
1358-
fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
1359-
fun:_Z21mysql_execute_commandP3THD
1360-
fun:_Z11mysql_parseP3THDPcjP12Parser_state
1361-
fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
1362-
fun:_Z16dispatch_command19enum_server_commandP3THDPcj
1363-
fun:_Z10do_commandP3THD
1364-
fun:_Z24do_handle_one_connectionP3THD
1365-
fun:handle_one_connection
1366-
}
1367-
13681324
{
13691325
codership/mysql-wsrep/issues#176
13701326
Memcheck:Leak
@@ -1475,72 +1431,6 @@ g codership/mysql-wsrep/issues#176
14751431
fun:_Z24do_handle_one_connectionP3THD
14761432
}
14771433

1478-
{
1479-
codership/mysql-wsrep/issues#176
1480-
Memcheck:Leak
1481-
match-leak-kinds: possible
1482-
fun:malloc
1483-
fun:strdup
1484-
fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
1485-
fun:galera_parameters_get
1486-
fun:_ZL24refresh_provider_optionsv
1487-
fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
1488-
fun:_ZN7sys_var6updateEP3THDP7set_var
1489-
fun:_ZN7set_var6updateEP3THD
1490-
fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
1491-
fun:_Z21mysql_execute_commandP3THD
1492-
fun:_Z11mysql_parseP3THDPcjP12Parser_state
1493-
fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
1494-
fun:_Z16dispatch_command19enum_server_commandP3THDPcj
1495-
fun:_Z10do_commandP3THD
1496-
fun:_Z24do_handle_one_connectionP3THD
1497-
fun:handle_one_connection
1498-
}
1499-
1500-
{
1501-
codership/mysql-wsrep/issues#176
1502-
Memcheck:Leak
1503-
match-leak-kinds: definite
1504-
fun:malloc
1505-
fun:strdup
1506-
fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
1507-
fun:galera_parameters_get
1508-
fun:_ZL24refresh_provider_optionsv
1509-
fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
1510-
fun:_ZN7sys_var6updateEP3THDP7set_var
1511-
fun:_ZN7set_var6updateEP3THD
1512-
fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
1513-
fun:_Z21mysql_execute_commandP3THD
1514-
fun:_Z11mysql_parseP3THDPcjP12Parser_state
1515-
fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
1516-
fun:_Z16dispatch_command19enum_server_commandP3THDPcj
1517-
fun:_Z10do_commandP3THD
1518-
fun:_Z24do_handle_one_connectionP3THD
1519-
fun:handle_one_connection
1520-
}
1521-
1522-
{
1523-
codership/mysql-wsrep/issues#176
1524-
Memcheck:Leak
1525-
match-leak-kinds: definite
1526-
fun:malloc
1527-
fun:strdup
1528-
fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
1529-
fun:galera_parameters_get
1530-
fun:_ZL24refresh_provider_optionsv
1531-
fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type
1532-
fun:_ZN7sys_var6updateEP3THDP7set_var
1533-
fun:_ZN7set_var6updateEP3THD
1534-
fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
1535-
fun:_Z21mysql_execute_commandP3THD
1536-
fun:_Z11mysql_parseP3THDPcjP12Parser_state
1537-
fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
1538-
fun:_Z16dispatch_command19enum_server_commandP3THDPcj
1539-
fun:_Z10do_commandP3THD
1540-
fun:_Z24do_handle_one_connectionP3THD
1541-
fun:handle_one_connection
1542-
}
1543-
15441434
{
15451435
codership/galera#331
15461436
Memcheck:Leak

sql/wsrep_var.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ static bool refresh_provider_options()
216216
get_provider_option_value(wsrep_provider_options,
217217
(char*)"repl.max_ws_size",
218218
&wsrep_max_ws_size);
219+
free(opts);
219220
}
220221
else
221222
{

wsrep/wsrep_dummy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static wsrep_status_t dummy_options_set(
8686
static char* dummy_options_get (wsrep_t* w)
8787
{
8888
WSREP_DBUG_ENTER(w);
89-
return WSREP_DUMMY(w)->options;
89+
return strdup(WSREP_DUMMY(w)->options);
9090
}
9191

9292
static wsrep_status_t dummy_connect(

0 commit comments

Comments
 (0)