diff --git a/src/feature/api/org_torproject_jni_TorService.c b/src/feature/api/org_torproject_jni_TorService.c index a9b74f06a06..1b93a436723 100644 --- a/src/feature/api/org_torproject_jni_TorService.c +++ b/src/feature/api/org_torproject_jni_TorService.c @@ -258,6 +258,16 @@ Java_org_torproject_jni_TorService_runMain { return RunMain(env, thisObj); } + +JNIEXPORT void JNICALL +Java_org_torproject_jni_TorService_torFreeAll +(JNIEnv *env, jobject _ignore) +{ + UNUSED(env); + UNUSED(_ignore); + tor_free_all(0); +} + /** * Android does not support UNIX Domain Sockets, but we can fake it by sending * the file descriptor via a java.io.FileDescriptor instance, which can be diff --git a/src/feature/api/org_torproject_jni_TorService.h b/src/feature/api/org_torproject_jni_TorService.h index 50edcaa10e9..4ea0e5f9e20 100644 --- a/src/feature/api/org_torproject_jni_TorService.h +++ b/src/feature/api/org_torproject_jni_TorService.h @@ -62,6 +62,15 @@ JNIEXPORT jint JNICALL Java_org_torproject_jni_TorService_runMain (JNIEnv *, jobject); +/* + * Class: org_torproject_jni_TorService + * Method: torFreeAll + * Signature: ()V + */ +JNIEXPORT void JNICALL +Java_org_torproject_jni_TorService_torFreeAll +(JNIEnv *, jobject); + /* * Class: org_torproject_jni_TorService * Method: prepareFileDescriptor