changeset 8373:94493b5800bb

Merge
author vinnie
date Fri, 11 Oct 2013 20:47:16 +0100
parents d23247aa7462 cb373cf43294
children 9632de07d963 5d866df64ae3
files
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/lang/java_props_md.c	Fri Oct 11 20:35:00 2013 +0100
+++ b/src/solaris/native/java/lang/java_props_md.c	Fri Oct 11 20:47:16 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -158,6 +158,9 @@
 
     temp = malloc(strlen(lc) + 1);
     if (temp == NULL) {
+#ifdef MACOSX
+        free(lc); // malloced memory
+#endif
         JNU_ThrowOutOfMemoryError(env, NULL);
         return 0;
     }
@@ -172,7 +175,6 @@
          * the encoding - without it, we wouldn't get ISO-8859-15.
          * Therefore, this code section is Solaris-specific.
          */
-        lc = strdup(lc);    /* keep a copy, setlocale trashes original. */
         strcpy(temp, lc);
         p = strstr(temp, "@euro");
         if (p != NULL) {