From: Dean Jenkins Date: Thu, 28 Feb 2013 14:21:55 +0000 (+0000) Subject: Bluetooth: Return RFCOMM session ptrs to avoid freed session X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~65^2~170^2^2~116^2~51 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ff52f7d04d9cc31f1e81dcf9a2ba6335ed34905;p=pandora-kernel.git Bluetooth: Return RFCOMM session ptrs to avoid freed session Unfortunately, the design retains local copies of the s RFCOMM session pointer in various code blocks and this invites the erroneous access to a freed RFCOMM session structure. Therefore, return the RFCOMM session pointer back up the call stack to avoid accessing a freed RFCOMM session structure. When the RFCOMM session is deleted, NULL is passed up the call stack. If active DLCs exist when the rfcomm session is terminating, avoid a memory leak of rfcomm_dlc structures by ensuring that rfcomm_session_close() is used instead of rfcomm_session_del(). Signed-off-by: Dean Jenkins Acked-by: Marcel Holtmann Signed-off-by: Gustavo Padovan --- Reading git-diff-tree failed