Skip to content

Commit

Permalink
Free the package object in the C API test.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleary committed Jun 2, 2024
1 parent f226749 commit 64fa2ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xls/public/c_api_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ fn f(x: bits[32]) -> bits[32] {
struct xls_package* package = nullptr;
ASSERT_TRUE(xls_parse_ir_package(kPackage.c_str(), "p.ir", &error, &package))
<< "xls_parse_ir_package error: " << error;
absl::Cleanup free_package([package] { xls_package_free(package); });

struct xls_function* function = nullptr;
ASSERT_TRUE(xls_package_get_function(package, "f", &error, &function));
Expand Down

0 comments on commit 64fa2ad

Please sign in to comment.