Skip to content

Commit ece231f

Browse files
committed
lpac-jni: Run euicc_http_cleanup() on success
1 parent db8063c commit ece231f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libs/lpac-jni/src/main/jni/lpac-jni/lpac-download.c

+3
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,11 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
126126
syslog(LOG_INFO, "es10b_load_bound_profile_package %d, reason %d", ret, es10b_load_bound_profile_package_result.errorReason);
127127
if (ret < 0) {
128128
ret = - (int) es10b_load_bound_profile_package_result.errorReason;
129+
goto out;
129130
}
130131

132+
euicc_http_cleanup(ctx);
133+
131134
out:
132135
// We expect Java side to call cancelSessions after any error -- thus, `euicc_http_cleanup` is done there
133136
// This is so that Java side can access the last HTTP and/or APDU errors when we return.

0 commit comments

Comments
 (0)