OSDN Git Service
libsensors: Fix memory leak when sensors are enabled
BuildChannelList is called every time the sensor is opened, not simply
once on initialization. The info_array would continually grow with
newly probed channel objects (i.e. 3 objects for
accelerometer/gyro/compass, one for ALS) appeneded every time, and it
was similarly used to size the raw_buffer used for the read() call.
Change-Id: I163fe2e3abddbd7196e90bc1774f6584b47ab3f4
For: AXIA-3287
Signed-off-by: Andy Ross <andy.ross@windriver.com>
Reviewed-on: https://otc-android.intel.com/gerrit/22149
Reviewed-by: Daniel Leung <daniel.leung@intel.com>
Reviewed-by: Russell Webb <russell.webb@intel.com>
Tested-by: jenkins autobuilder