Commit 1475e6984a5db4afaf454a06a67071130e86dca7

Sam Lantinga 2017-11-01T19:19:21

Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable Sylvain Some issue with this commit: https://hg.libsdl.org/SDL/rev/97387a8b88d3 There is a memory allocation missing.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c
index 78ef776..04a5f24 100644
--- a/src/core/android/SDL_android.c
+++ b/src/core/android/SDL_android.c
@@ -2121,6 +2121,7 @@ char *SDL_AndroidGetManifestEnvironmentVariable(const char *variableName)
 
     jstring jVariableName = (*env)->NewStringUTF(env, variableName);
     jstring jResult = (jstring)((*env)->CallStaticObjectMethod(env, mActivityClass, midGetManifestEnvironmentVariable, jVariableName));
+    (*env)->DeleteLocalRef(env, jVariableName);
 
     if (jResult == NULL) {
         return NULL;