aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-03-22 11:25:32 +0100
committerHarald Welte <laforge@osmocom.org>2020-03-22 11:26:24 +0100
commit17051403bfb9916896afbfd2c4d0234d6d5b144b (patch)
treeb41822ef15aa9bd96fb1e2990a82a613ec1284b6
parent2954aa9b8a71108f44e5fd25401198453501e6a7 (diff)
osmo-sim-test: Avoid double-close
Change-Id: Ibd67a5461085a77dd9e804a4f1266d67ee91a04a Closes: CID#208960
-rw-r--r--utils/osmo-sim-test.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c
index 6cf36a6a..cf423c49 100644
--- a/utils/osmo-sim-test.c
+++ b/utils/osmo-sim-test.c
@@ -421,11 +421,8 @@ static int dump_file(struct osim_chan_hdl *chan, const char *short_name, uint16_
break;
case EF_TYPE_TRANSP:
if (g_class != 0xA0) {
- if (!TLVP_PRESENT(&tp, UICC_FCP_T_FILE_SIZE)) {
- if (f_data)
- fclose(f_data);
+ if (!TLVP_PRESENT(&tp, UICC_FCP_T_FILE_SIZE))
goto out;
- }
i = ntohs(*(uint16_t *)TLVP_VAL(&tp, UICC_FCP_T_FILE_SIZE));
printf("File size: %d bytes\n", i);
} else {