[PATCH 2/2] msvcrt: check locale for NULL before freeing
Marcus Meissner
meissner at suse.de
Thu May 20 09:20:29 CDT 2010
---
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 38d39a2..eec78c4 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -576,6 +576,9 @@ void CDECL _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);
--
1.6.4.2
More information about the wine-patches
mailing list