Merge "Fix JNI leak in copyStringToBuffer Bug: 5244396"
diff --git a/core/jni/android_database_CursorWindow.cpp b/core/jni/android_database_CursorWindow.cpp
index ddac820..419e464 100644
--- a/core/jni/android_database_CursorWindow.cpp
+++ b/core/jni/android_database_CursorWindow.cpp
@@ -352,7 +352,6 @@
char buf[32];
int len;
snprintf(buf, sizeof(buf), "%lld", value);
- jchar* dst = env->GetCharArrayElements(buffer, NULL);
sizeCopied = charToJchar(buf, dst, bufferSize);
}
} else if (type == FIELD_TYPE_FLOAT) {
@@ -360,7 +359,6 @@
if (window->getDouble(row, column, &value)) {
char tempbuf[32];
snprintf(tempbuf, sizeof(tempbuf), "%g", value);
- jchar* dst = env->GetCharArrayElements(buffer, NULL);
sizeCopied = charToJchar(tempbuf, dst, bufferSize);
}
} else if (type == FIELD_TYPE_NULL) {