File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,10 @@ Java_network_loki_messenger_libsession_1util_ConfigBase_confirmPushed(JNIEnv *en
75
75
std::unordered_set<std::string> hashes (hash_list_size);
76
76
77
77
for (int i = 0 ; i < hash_list_size; i++) {
78
- auto hash_jstring = ( jstring) env->GetObjectArrayElement (hash_list, i);
79
- auto hash = env->GetStringUTFChars (hash_jstring, nullptr );
78
+ auto hash_jstring = jni_utils::JavaLocalRef (env, ( jstring) env->GetObjectArrayElement (hash_list, i) );
79
+ auto hash = env->GetStringUTFChars (hash_jstring. get () , nullptr );
80
80
hashes.insert (hash);
81
- env->ReleaseStringUTFChars (hash_jstring, hash);
82
- env->DeleteLocalRef (hash_jstring);
81
+ env->ReleaseStringUTFChars (hash_jstring.get (), hash);
83
82
}
84
83
85
84
conf->confirm_pushed (seq_no, hashes);
You can’t perform that action at this time.
0 commit comments