Fixed memory leaks in xfpga sysfs tests.
@@ -560,6 +560,7 @@ TEST_P(sysfs_c_mock_p, make_sysfs) {
res = make_sysfs_group(tok->sysfspath, "errors", &obj, FPGA_OBJECT_GLOB,
handle_);
EXPECT_EQ(res, FPGA_OK);
+ EXPECT_EQ(xfpga_fpgaDestroyObject(&obj), FPGA_OK);
res = make_sysfs_group(const_cast<char *>(invalid_path.c_str()), "errors",
&obj, 0, handle_);
@@ -583,6 +584,7 @@ TEST_P(sysfs_c_mock_p, make_object_glob) {
ASSERT_EQ(make_sysfs_object(tok->sysfspath, "errors", &object,
FPGA_OBJECT_GLOB, 0),
FPGA_OK);
+ EXPECT_EQ(xfpga_fpgaDestroyObject(&object), FPGA_OK);
}
/**
