Parent: 3a916a006756aff954565f613c6163bb59dae26a
Author: Rafal Michalski <michalski.raf@gmail.com>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2011-06-14 12:06:42
Tree: b74b1305e163215a3758b3227d9b6ddae1cbccd5
Fix invalid write to memory issue in A2DP module Under some circumstances (such as terminating bluetoothd during music is streamed) sep object may be destroyed (memory for sep object is internally freed, directly by "a2dp_unregister_sep") after invoking "media_endpoint_clear_configuration" (in "stream_state_changed"). It leads to invalid write issue (reported by valgrind) after assignment "sep->stream = NULL", since "sep" is "alias" pointer to sep object which is already out of date (memory for sep object has been already freed) This patch prevents from this issue by ensuring that assignment "sep->stream = NULL" would be executed when sep object certainly exists.
Diffstat
| M | audio/a2dp.c | | | 5 | ++- - - |
1 files changed, 2 insertions(+), 3 deletions(-)