forked from mirrors/linphone-iphone
Fixing leak in JNI concerning file transfert
This commit is contained in:
parent
30689ca2e6
commit
7c712bbec3
1 changed files with 7 additions and 0 deletions
|
|
@ -1555,6 +1555,9 @@ public:
|
|||
jcontent,
|
||||
jbytes,
|
||||
size);
|
||||
if (jbytes) {
|
||||
env->DeleteLocalRef(jbytes);
|
||||
}
|
||||
if (jcontent) {
|
||||
env->DeleteLocalRef(jcontent);
|
||||
}
|
||||
|
|
@ -6230,6 +6233,9 @@ static jobject create_java_linphone_content(JNIEnv *env, const LinphoneContent *
|
|||
env->DeleteLocalRef(contentClass);
|
||||
env->DeleteLocalRef(jtype);
|
||||
env->DeleteLocalRef(jsubtype);
|
||||
if (jdata) {
|
||||
env->DeleteLocalRef(jdata);
|
||||
}
|
||||
if (jencoding) {
|
||||
env->DeleteLocalRef(jencoding);
|
||||
}
|
||||
|
|
@ -6256,6 +6262,7 @@ static jobject create_java_linphone_buffer(JNIEnv *env, const LinphoneBuffer *bu
|
|||
}
|
||||
|
||||
jobject jobj = env->NewObject(bufferClass, ctor, jdata, jsize);
|
||||
if (jdata) env->DeleteLocalRef(jdata);
|
||||
env->DeleteLocalRef(bufferClass);
|
||||
return jobj;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue