lpac-jni: Run euicc_http_cleanup() on success
All checks were successful
/ build-debug (push) Successful in 4m41s

This commit is contained in:
Peter Cai 2025-03-08 17:05:52 -05:00
parent db8063cd5f
commit ece231f17b

View file

@ -126,8 +126,11 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
syslog(LOG_INFO, "es10b_load_bound_profile_package %d, reason %d", ret, es10b_load_bound_profile_package_result.errorReason);
if (ret < 0) {
ret = - (int) es10b_load_bound_profile_package_result.errorReason;
goto out;
}
euicc_http_cleanup(ctx);
out:
// We expect Java side to call cancelSessions after any error -- thus, `euicc_http_cleanup` is done there
// This is so that Java side can access the last HTTP and/or APDU errors when we return.