summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunlian Jiang <yunlian@google.com>2016-11-15 17:39:15 -0800
committerGeorge Burgess IV <gbiv@google.com>2016-11-30 12:51:32 -0800
commit2e716c20485227cd01ec3a91ac1837a53fa924b3 (patch)
tree379046cd4f46c75ea2175208514a626973ee20aa
parent15060bea5cae5e84a06f55c5f897127834a080ab (diff)
fix Attempt to free released memory warning.
This fixes the warning Attempt to free released memory warning. Bug: none Test: the warning is gone. Change-Id: I4f5bbbf95d2985baf46cf948b92f81365a0ef611
-rw-r--r--luni/src/main/native/java_lang_StringToReal.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/luni/src/main/native/java_lang_StringToReal.cpp b/luni/src/main/native/java_lang_StringToReal.cpp
index d1902af4c5..c3217026fb 100644
--- a/luni/src/main/native/java_lang_StringToReal.cpp
+++ b/luni/src/main/native/java_lang_StringToReal.cpp
@@ -286,6 +286,7 @@ static jdouble doubleAlgorithm(JNIEnv* env, uint64_t* f, int32_t length, jint e,
free(y);
free(D);
free(D2);
+ y = D = D2 = NULL;
if (e >= 0 && k >= 0)
{
@@ -713,6 +714,7 @@ static jfloat floatAlgorithm(JNIEnv* env, uint64_t* f, int32_t length, jint e, j
free(y);
free(D);
free(D2);
+ y = D = D2 = NULL;
if (e >= 0 && k >= 0)
{