ADXL345: Free allocations on failure
This commit is contained in:
parent
09b16e3819
commit
34609141b0
@ -442,6 +442,7 @@ ADXL345_HANDLE adxl345_instantiate(FAR struct i2c_dev_s *dev,
|
||||
if (ret < 0)
|
||||
{
|
||||
sndbg("Wrong Device ID!\n");
|
||||
kmm_free(priv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user