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

thumbnailer: fix memleak

parent 1f1c08c7
...@@ -220,7 +220,6 @@ jbyteArray Java_org_videolan_vlc_android_LibVLC_getThumbnail(JNIEnv *p_env, jobj ...@@ -220,7 +220,6 @@ jbyteArray Java_org_videolan_vlc_android_LibVLC_getThumbnail(JNIEnv *p_env, jobj
if (byteArray == NULL) if (byteArray == NULL)
{ {
LOGE("Couldn't allocate the Java byte array to store the frame!"); LOGE("Couldn't allocate the Java byte array to store the frame!");
free(p_sys->p_thumbnail);
goto end; goto end;
} }
...@@ -233,6 +232,7 @@ end: ...@@ -233,6 +232,7 @@ end:
(*p_env)->ReleaseStringUTFChars(p_env, filePath, psz_filePath); (*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_thumbnail);
free(p_sys->p_frameData); free(p_sys->p_frameData);
free(p_sys); free(p_sys);
......
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