mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
ADXL345: Free allocations on failure
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user