Merge "Fixed memory leak in function getThumbnail."
diff --git a/main.c b/main.c
index 1b1eabd..ab820e3 100644
--- a/main.c
+++ b/main.c
@@ -458,6 +458,7 @@
     LOGE("thumbnail size %d\n", ImageInfo.ThumbnailSize);
 #endif
         (*env)->ReleaseStringUTFChars(env, jfilename, filename);
+        DiscardData();
         return byteArray;
     }
 noThumbnail: