diff options
author | Harald Welte <laforge@osmocom.org> | 2020-03-22 11:25:32 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-03-22 11:26:24 +0100 |
commit | 17051403bfb9916896afbfd2c4d0234d6d5b144b (patch) | |
tree | b41822ef15aa9bd96fb1e2990a82a613ec1284b6 /utils | |
parent | 2954aa9b8a71108f44e5fd25401198453501e6a7 (diff) |
osmo-sim-test: Avoid double-close
Change-Id: Ibd67a5461085a77dd9e804a4f1266d67ee91a04a
Closes: CID#208960
Diffstat (limited to 'utils')
-rw-r--r-- | utils/osmo-sim-test.c | 5 |
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 { |