Free allocated buffer in Linux pure i2c block transfer function
This commit is contained in:
parent
46d8ca718e
commit
341607ec3e
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue