[haiku-development] Re: Fixed obvious memory leak in CLuceneDataBase
- From: looncraz <looncraz@xxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Thu, 7 Jan 2016 19:07:55 -0600
On 1/7/2016 15:21, viktor muntzing wrote:
Not sure if this is the right place to post such small patches.
Need to start somewhere :)
What I see here should not even compile:
if (mbstowcs(wStr, str, size) == -1)
delete[] wStr;
return NULL ;
else
return wStr ;
Shouldn't this be:
if (mbstowcs(wStr, str, size) == -1) {
delete[] wStr;
return NULL ;
} else {
return wStr ;
}
--The loon
Other related posts: