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-utils.c b/tests/test-utils.c
index 5e78474..2a346fa 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -16,7 +16,7 @@
* the local EID as the destination */
struct mctp_binding_test {
struct mctp_binding binding;
- uint8_t tx_storage[MCTP_PKTBUF_SIZE(MCTP_BTU)];
+ uint8_t tx_storage[MCTP_PKTBUF_SIZE(MCTP_BTU)] PKTBUF_STORAGE_ALIGN;
};
static int mctp_binding_test_tx(struct mctp_binding *b, struct mctp_pktbuf *pkt)