Free allocated buffer in Linux pure i2c block transfer function

This commit is contained in:
Adam Honse
2021-12-29 03:48:19 -06:00
parent 46d8ca718e
commit 341607ec3e

View File

@@ -56,6 +56,8 @@ s32 i2c_smbus_linux::i2c_xfer(u8 addr, char read_write, int* size, u8* data)
memcpy(data, &msg.buf, *size);
}
free(msg.buf);
return ret_val;
}