Marcus Meissner : msvcrt: Check locale for NULL before freeing.
Alexandre Julliard
julliard at winehq.org
Fri May 21 12:15:22 CDT 2010
Module: wine
Branch: master
Commit: 27a28bf29fabcaf3ef5c62cd746b6b16e67cc034
URL: http://source.winehq.org/git/wine.git/?a=commit;h=27a28bf29fabcaf3ef5c62cd746b6b16e67cc034
Author: Marcus Meissner <meissner at suse.de>
Date: Thu May 20 16:20:29 2010 +0200
msvcrt: Check locale for NULL before freeing.
---
dlls/msvcrt/locale.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index 30cd5b5..a347962 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -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);
More information about the wine-cvs
mailing list