Fix memory link.

If a `searcher` is already created we must delete it.
If we set the pointer to NULL before, we will never delete it.
This commit is contained in:
Matthieu Gautier 2017-07-04 16:57:22 +02:00
parent c56e1f0446
commit 4a51dd9e00
1 changed files with 0 additions and 1 deletions

View File

@ -486,7 +486,6 @@ JNIEXPORT jboolean JNICALL Java_org_kiwix_kiwixlib_JNIKiwix_loadFulltextIndex(
std::string cPath = jni2c(path, env);
pthread_mutex_lock(&searcherLock);
searcher = NULL;
try {
if (searcher != NULL) {
delete searcher;