List:Commits« Previous MessageNext Message »
From:Dmitry Lenev Date:November 16 2010 10:27am
Subject:Re: bzr commit into mysql-5.5-bugteam branch (mats.kindahl:3124)
Bug#58173
View as plain text  
Hello Mats!

* Mats Kindahl <mats.kindahl@stripped> [10/11/15 18:19]:
> #At file:///home/bzr/bugs/b57108-5.5-bugteam/ based on
> revid:vvaintroub@stripped
> 
>  3124 Mats Kindahl	2010-11-15
>       Bug #58173: Valgrind warning in load_defaults()
>       
>       Memory was allocated for storing path names inside
>       fn_expand(), which were not free:ed anywhere.
>       
>       This patch fixes the problem by storing the path
>       names in statically allocated buffers instead,
>       which is automatically free:ed when the server
>       exits.

...

> === modified file 'mysys/default.c'
> --- a/mysys/default.c	2010-11-04 10:00:59 +0000
> +++ b/mysys/default.c	2010-11-15 15:17:00 +0000
> @@ -152,22 +155,19 @@ static char *remove_end_comment(char *pt
>   */
>  
>  static int
> -fn_expand(const char *filename, const char **filename_var)
> +fn_expand(const char *filename, char result_buf[FN_REFLEN])
>  {

I agree with Alik it is better to use "char *" instead of
"char[FN_REFLEN]" for this out-parameter, simply for the
sake of consistency with other similar functions.

Otherwise I am OK with your patch and think that
it can be pushed into the 5.5 tree.

-- 
Dmitry Lenev, Software Developer
Oracle Development SPB/MySQL, www.mysql.com

Are you MySQL certified?  http://www.mysql.com/certification
Thread
bzr commit into mysql-5.5-bugteam branch (mats.kindahl:3124) Bug#58173Mats Kindahl15 Nov
Re: bzr commit into mysql-5.5-bugteam branch (mats.kindahl:3124)Bug#58173Alexander Nozdrin16 Nov
  • Re: bzr commit into mysql-5.5-bugteam branch (mats.kindahl:3124)Bug#58173Mats Kindahl16 Nov
Re: bzr commit into mysql-5.5-bugteam branch (mats.kindahl:3124)Bug#58173Dmitry Lenev16 Nov
  • Re: bzr commit into mysql-5.5-bugteam branch (mats.kindahl:3124)Bug#58173Mats Kindahl16 Nov