Merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1334719 into lp:percona-server/5.5

Proposed by Sergei Glushchenko on 2014-09-01
Status: Merged
Approved by: Laurynas Biveinis on 2014-09-25
Approved revision: 692
Merged at revision: 700
Proposed branch: lp:~sergei.glushchenko/percona-server/5.5-ps-bug1334719
Merge into: lp:percona-server/5.5
Diff against target: 20 lines (+2/-1)
1 file modified
sql/mysqld.cc (+2/-1)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1334719
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) 2014-09-01 Approve on 2014-09-25
Review via email: mp+232900@code.launchpad.net

Description of the change

    Bug 1334719: Valgrind: memory leak in MTR percona_secure_file_priv_noarg

    Release memory allocated for opt_secure_file_priv in my_getopt.c
    with my_strdup.

    Tested locally with ./mtr percona_secure_file_priv_noarg secure_file_priv --valgrind

http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/1044/

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sql/mysqld.cc'
2--- sql/mysqld.cc 2014-08-22 09:58:37 +0000
3+++ sql/mysqld.cc 2014-09-01 14:53:56 +0000
4@@ -432,7 +432,7 @@
5 my_bool relay_log_recovery;
6 my_bool opt_sync_frm, opt_allow_suspicious_udfs;
7 my_bool opt_secure_auth= 0;
8-char* opt_secure_file_priv;
9+char* opt_secure_file_priv= NULL;
10 my_bool opt_secure_file_priv_noarg= FALSE;
11 my_bool opt_log_slow_admin_statements= 0;
12 my_bool opt_log_slow_slave_statements= 0;
13@@ -7521,6 +7521,7 @@
14 case OPT_SECURE_FILE_PRIV:
15 if (argument == NULL)
16 {
17+ my_free(opt_secure_file_priv);
18 opt_secure_file_priv_noarg= TRUE;
19 opt_secure_file_priv= my_strdup("ON", MYF(0));
20 }

Subscribers

People subscribed via source and target branches