fix missing DeleteLocalRef in loops
This commit is contained in:
parent
dd1b52c7d9
commit
703f9290c9
2 changed files with 10 additions and 9 deletions
|
@ -608,6 +608,8 @@ jobject newPeer(JNIEnv *env, const ZT_Peer &peer)
|
|||
LOGE("exception assigning PeerPhysicalPath to array");
|
||||
break;
|
||||
}
|
||||
|
||||
env->DeleteLocalRef(path);
|
||||
}
|
||||
|
||||
env->SetObjectField(peerObject, pathsField, arrayObject);
|
||||
|
@ -809,6 +811,8 @@ jobject newNetworkConfig(JNIEnv *env, const ZT_VirtualNetworkConfig &vnetConfig)
|
|||
LOGE("Error assigning InetSocketAddress to array");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
env->DeleteLocalRef(inetAddrObj);
|
||||
}
|
||||
|
||||
env->SetObjectField(vnetConfigObj, assignedAddressesField, assignedAddrArrayObj);
|
||||
|
@ -837,6 +841,8 @@ jobject newNetworkConfig(JNIEnv *env, const ZT_VirtualNetworkConfig &vnetConfig)
|
|||
LOGE("Error assigning VirtualNetworkRoute to array");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
env->DeleteLocalRef(routeObj);
|
||||
}
|
||||
|
||||
env->SetObjectField(vnetConfigObj, routesField, routesArrayObj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue