index_server: Fix obvious memory leak in CLuceneDataBase
Signed-off-by: Alexander von Gluck IV <kallisti5@unixzen.com>
This commit is contained in:
parent
59b0036e71
commit
fd5d0900da
@ -35,9 +35,10 @@ wchar_t* to_wchar(const char *str)
|
||||
int size = strlen(str) * sizeof(wchar_t) ;
|
||||
wchar_t *wStr = new wchar_t[size] ;
|
||||
|
||||
if (mbstowcs(wStr, str, size) == -1)
|
||||
if (mbstowcs(wStr, str, size) == -1) {
|
||||
delete[] wStr ;
|
||||
return NULL ;
|
||||
else
|
||||
} else
|
||||
return wStr ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user