mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-13 20:58:29 +00:00
fix ANDROID-35: memory leak
This commit is contained in:
@ -992,6 +992,8 @@ JNIEXPORT jobject JNICALL Java_com_zerotier_sdk_Node_processVirtualNetworkFrame(
|
|||||||
frameLength,
|
frameLength,
|
||||||
&nextBackgroundTaskDeadline);
|
&nextBackgroundTaskDeadline);
|
||||||
|
|
||||||
|
free(localData);
|
||||||
|
|
||||||
jlong *outDeadline = (jlong*)env->GetPrimitiveArrayCritical(out_nextBackgroundTaskDeadline, NULL);
|
jlong *outDeadline = (jlong*)env->GetPrimitiveArrayCritical(out_nextBackgroundTaskDeadline, NULL);
|
||||||
outDeadline[0] = (jlong)nextBackgroundTaskDeadline;
|
outDeadline[0] = (jlong)nextBackgroundTaskDeadline;
|
||||||
env->ReleasePrimitiveArrayCritical(out_nextBackgroundTaskDeadline, outDeadline, 0);
|
env->ReleasePrimitiveArrayCritical(out_nextBackgroundTaskDeadline, outDeadline, 0);
|
||||||
|
Reference in New Issue
Block a user