Commit abbc139a authored by Rafaël Carré's avatar Rafaël Carré
Browse files

thumbnailer: fix memleak

parent 854d1b33
...@@ -104,6 +104,7 @@ jbyteArray Java_org_videolan_vlc_android_LibVLC_getThumbnail(JNIEnv *p_env, jobj ...@@ -104,6 +104,7 @@ jbyteArray Java_org_videolan_vlc_android_LibVLC_getThumbnail(JNIEnv *p_env, jobj
if (p_sys == NULL) if (p_sys == NULL)
{ {
LOGE("Couldn't create the thumbnailer data structure!"); LOGE("Couldn't create the thumbnailer data structure!");
(*p_env)->ReleaseStringUTFChars(p_env, filePath, psz_filePath);
return NULL; return NULL;
} }
...@@ -225,10 +226,9 @@ jbyteArray Java_org_videolan_vlc_android_LibVLC_getThumbnail(JNIEnv *p_env, jobj ...@@ -225,10 +226,9 @@ jbyteArray Java_org_videolan_vlc_android_LibVLC_getThumbnail(JNIEnv *p_env, jobj
(jbyte *)p_sys->p_thumbnail); (jbyte *)p_sys->p_thumbnail);
(*p_env)->DeleteLocalRef(p_env, byteArray); (*p_env)->DeleteLocalRef(p_env, byteArray);
(*p_env)->ReleaseStringUTFChars(p_env, filePath, psz_filePath);
end: end:
/* Free the memory. */ (*p_env)->ReleaseStringUTFChars(p_env, filePath, psz_filePath);
pthread_mutex_destroy(&p_sys->doneMutex); pthread_mutex_destroy(&p_sys->doneMutex);
pthread_cond_destroy(&p_sys->doneCondVar); pthread_cond_destroy(&p_sys->doneCondVar);
free(p_sys->p_frameData); free(p_sys->p_frameData);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment