Fix test-i2c leak, and mctp_pktbuf storage alignment
- Ensure mctp_pktbuf storage is correctly aligned
- Deallocate mctp and i2c instances to avoid failure with asan.
These previously succeeded in CI so are both fixed in this commit.
Fixes: e5b941d9d764 ("i2c: Add binding for MCTP over I2C transport")
Fixes: 4a09e1dc4883 ("core: Reuse buffers for tx, allow message pools")
Change-Id: I747bfff6faf3a5b0a982ae266bcef02ecbc4ee8a
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
diff --git a/tests/test_i2c.c b/tests/test_i2c.c
index 067d551..89e7744 100644
--- a/tests/test_i2c.c
+++ b/tests/test_i2c.c
@@ -259,5 +259,10 @@
test_neigh_expiry(tx_test, rx_test);
+ free(tx_test->i2c);
+ free(rx_test->i2c);
+ mctp_destroy(tx_test->mctp);
+ mctp_destroy(rx_test->mctp);
+
return 0;
}