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
6961e006
Commit
6961e006
authored
Dec 21, 2002
by
vva@eagle.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some warnings
parent
852508a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
libmysql/libmysql.c
libmysql/libmysql.c
+8
-3
libmysqld/libmysqld.c
libmysqld/libmysqld.c
+8
-3
No files found.
libmysql/libmysql.c
View file @
6961e006
...
...
@@ -947,7 +947,7 @@ static int add_init_command(struct st_mysql_options *options, const char *cmd)
}
if
(
!
(
tmp
=
my_strdup
(
cmd
,
MYF
(
MY_WME
)))
||
insert_dynamic
(
options
->
init_commands
,
(
byte
*
)
&
tmp
))
insert_dynamic
(
options
->
init_commands
,
(
gptr
)
&
tmp
))
{
my_free
(
tmp
,
MYF
(
MY_ALLOW_ZERO_PTR
));
return
1
;
...
...
@@ -2623,8 +2623,13 @@ mysql_close(MYSQL *mysql)
my_free
(
mysql
->
options
.
charset_name
,
MYF
(
MY_ALLOW_ZERO_PTR
));
if
(
mysql
->
options
.
init_commands
)
{
delete_dynamic
(
mysql
->
options
.
init_commands
);
my_free
((
char
*
)
mysql
->
options
.
init_commands
,
MYF
(
MY_WME
));
DYNAMIC_ARRAY
*
init_commands
=
mysql
->
options
.
init_commands
;
char
**
ptr
=
(
char
**
)
init_commands
->
buffer
;
char
**
end
=
ptr
+
init_commands
->
elements
;
for
(;
ptr
<
end
;
ptr
++
)
my_free
(
*
ptr
,
MYF
(
MY_WME
));
delete_dynamic
(
init_commands
);
my_free
((
char
*
)
init_commands
,
MYF
(
MY_WME
));
}
#ifdef HAVE_OPENSSL
mysql_ssl_free
(
mysql
);
...
...
libmysqld/libmysqld.c
View file @
6961e006
...
...
@@ -463,7 +463,7 @@ static int add_init_command(struct st_mysql_options *options, const char *cmd)
}
if
(
!
(
tmp
=
my_strdup
(
cmd
,
MYF
(
MY_WME
)))
||
insert_dynamic
(
options
->
init_commands
,
(
byte
*
)
&
tmp
))
insert_dynamic
(
options
->
init_commands
,
(
gptr
)
&
tmp
))
{
my_free
(
tmp
,
MYF
(
MY_ALLOW_ZERO_PTR
));
return
1
;
...
...
@@ -1152,8 +1152,13 @@ mysql_close(MYSQL *mysql)
my_free
(
mysql
->
options
.
charset_name
,
MYF
(
MY_ALLOW_ZERO_PTR
));
if
(
mysql
->
options
.
init_commands
)
{
delete_dynamic
(
mysql
->
options
.
init_commands
);
my_free
((
char
*
)
mysql
->
options
.
init_commands
,
MYF
(
MY_WME
));
DYNAMIC_ARRAY
*
init_commands
=
mysql
->
options
.
init_commands
;
char
**
ptr
=
(
char
**
)
init_commands
->
buffer
;
char
**
end
=
ptr
+
init_commands
->
elements
;
for
(;
ptr
<
end
;
ptr
++
)
my_free
(
*
ptr
,
MYF
(
MY_WME
));
delete_dynamic
(
init_commands
);
my_free
((
char
*
)
init_commands
,
MYF
(
MY_WME
));
}
/* Clear pointers for better safety */
mysql
->
host_info
=
mysql
->
user
=
mysql
->
passwd
=
mysql
->
db
=
0
;
...
...
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