summaryrefslogtreecommitdiff
path: root/utils/imxtools/sb.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/imxtools/sb.c')
-rw-r--r--utils/imxtools/sb.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/imxtools/sb.c b/utils/imxtools/sb.c
index 44db56b7d1..23b89e52c8 100644
--- a/utils/imxtools/sb.c
+++ b/utils/imxtools/sb.c
@@ -1039,13 +1039,16 @@ struct sb_file_t *sb_read_file(const char *filename, bool raw_mode, void *u,
1039 #undef print_hex 1039 #undef print_hex
1040} 1040}
1041 1041
1042void sb_free_instruction(struct sb_inst_t inst)
1043{
1044 free(inst.padding);
1045 free(inst.data);
1046}
1047
1042void sb_free_section(struct sb_section_t sec) 1048void sb_free_section(struct sb_section_t sec)
1043{ 1049{
1044 for(int j = 0; j < sec.nr_insts; j++) 1050 for(int j = 0; j < sec.nr_insts; j++)
1045 { 1051 sb_free_instruction(sec.insts[j]);
1046 free(sec.insts[j].padding);
1047 free(sec.insts[j].data);
1048 }
1049 free(sec.insts); 1052 free(sec.insts);
1050} 1053}
1051 1054