Fix memory leak

This commit is contained in:
Christophe Deschamps 2015-12-28 09:26:32 +01:00
parent a142ea2981
commit a589056381

View file

@ -2990,6 +2990,7 @@ extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_setRLSUri(JNIEnv*
,jstring jrlsUri) {
const char* uri = env->GetStringUTFChars(jrlsUri, NULL);
linphone_friend_list_set_rls_uri((LinphoneFriendList*)ptr,uri);
env->ReleaseStringUTFChars(jrlsUri, uri);
}
extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_addFriend(JNIEnv* env
@ -3012,7 +3013,10 @@ extern "C" jlong Java_org_linphone_core_LinphoneFriendListImpl_findFriendByUri(J
,jlong friendListptr
,jstring juri) {
const char* uri = env->GetStringUTFChars(juri, NULL);
return (jlong)linphone_friend_list_find_friend_by_uri((LinphoneFriendList*)friendListptr,uri);
LinphoneFriend* lResult;
lResult = linphone_friend_list_find_friend_by_uri((LinphoneFriendList*)friendListptr,uri);
env->ReleaseStringUTFChars(juri, uri);
return (jlong)lResult;
}
extern "C" jlong Java_org_linphone_core_LinphoneFriendImpl_getAddress(JNIEnv* env