List:Commits« Previous MessageNext Message »
From:Mats Kindahl Date:November 16 2010 11:00am
Subject:Re: bzr commit into mysql-5.5-bugteam branch (mats.kindahl:3124)
Bug#58173
View as plain text  
On 11/16/2010 11:27 AM, Dmitry Lenev wrote:
> 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.
>   

OK. I've already changed the signature and, since you had nothing in
addition to the comment from Alik, I will commit a patch with this change.
 
(Actually, was just committed.)
/Matz

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