[PATCH i-g-t 16/17] tools/intel_bios_reader: free the block returned by find_section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since we no longer store pointers to previous blocks, we can free them.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 tools/intel_bios_reader.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 3e5df3007520..de90f5d37d5d 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -1375,7 +1375,7 @@ static void hex_dump(const struct bdb_block *block)
 static bool dump_section(struct context *context, int section_id)
 {
 	struct dumper *dumper = NULL;
-	const struct bdb_block *block;
+	struct bdb_block *block;
 	int i;
 
 	block = find_section(context, section_id);
@@ -1400,6 +1400,8 @@ static bool dump_section(struct context *context, int section_id)
 		dumper->dump(context, block);
 	printf("\n");
 
+	free(block);
+
 	return true;
 }
 
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux