Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e876aa2b
Commit
e876aa2b
authored
Oct 17, 2013
by
Vicențiu Ciorbaru
Committed by
Sergei Golubchik
Oct 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory leak caused by user deletion, aswell as invalid free caused by
user creation.
parent
7e18b8f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
sql/sql_acl.cc
sql/sql_acl.cc
+3
-0
No files found.
sql/sql_acl.cc
View file @
e876aa2b
...
...
@@ -1772,6 +1772,8 @@ static void acl_insert_user(const char *user, const char *host,
acl_user
.
ssl_cipher
=
ssl_cipher
?
strdup_root
(
&
mem
,
ssl_cipher
)
:
0
;
acl_user
.
x509_issuer
=
x509_issuer
?
strdup_root
(
&
mem
,
x509_issuer
)
:
0
;
acl_user
.
x509_subject
=
x509_subject
?
strdup_root
(
&
mem
,
x509_subject
)
:
0
;
(
void
)
my_init_dynamic_array
(
&
acl_user
.
role_grants
,
sizeof
(
ACL_USER
*
),
50
,
100
,
MYF
(
0
));
(
void
)
push_dynamic
(
&
acl_users
,(
uchar
*
)
&
acl_user
);
if
(
!
acl_user
.
host
.
hostname
||
...
...
@@ -6474,6 +6476,7 @@ static int handle_grant_struct(enum enum_acl_lists struct_no, bool drop,
elements
--
;
switch
(
struct_no
)
{
case
USER_ACL
:
free_acl_user
(
dynamic_element
(
&
acl_users
,
idx
,
ACL_USER
*
));
delete_dynamic_element
(
&
acl_users
,
idx
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment