Skip to content

Commit a5fc08a

Browse files
fix memory leak by removing call to strdup
1 parent 2b31ba0 commit a5fc08a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3512,7 +3512,7 @@ static void ProcessSubTiles(pugi::xml_node Node,
35123512
expect_only_attributes(CurSubTile, {"name", "capacity"}, loc_data);
35133513

35143514
/* Load type name */
3515-
auto name = vtr::strdup(get_attribute(CurSubTile, "name", loc_data).value());
3515+
const char* name = get_attribute(CurSubTile, "name", loc_data).value();
35163516

35173517
//Check Sub Tile name duplicates
35183518
auto [_, success] = sub_tile_names.insert(name);

0 commit comments

Comments
 (0)