msvcrt: Check locale for NULL before freeing.

This commit is contained in:
Marcus Meissner 2010-05-20 16:20:29 +02:00 committed by Alexandre Julliard
parent c6e5e39460
commit 27a28bf29f
1 changed files with 3 additions and 0 deletions

View File

@ -576,6 +576,9 @@ void CDECL MSVCRT__free_locale(MSVCRT__locale_t locale)
{
int i;
if (!locale)
return;
for(i=MSVCRT_LC_MIN+1; i<=MSVCRT_LC_MAX; i++) {
MSVCRT_free(locale->locinfo->lc_category[i].locale);
MSVCRT_free(locale->locinfo->lc_category[i].refcount);