OSDN Git Service

HOGP: Clear allocated memory for unmatched HID reports
authorSubramanian Srinivasan <subrsrin@codeaurora.org>
Thu, 12 Feb 2015 00:55:12 +0000 (16:55 -0800)
committerAndre Eisenbach <eisenbach@google.com>
Wed, 24 Jun 2015 00:32:00 +0000 (17:32 -0700)
Prevents GKI Exception in BT stack when phone enters suspended state
after performing HOGP device connection by clearing the allocated
memory when write to an unmatched report is done.

Bug: 22028876
Change-Id: Ia6ca9405142410e894c7ebe84d8827ffdc7659ba

bta/hh/bta_hh_le.c

index fee2cda..318866c 100644 (file)
@@ -2562,6 +2562,7 @@ void bta_hh_le_write_rpt(tBTA_HH_DEV_CB *p_cb, UINT8 srvc_inst,
     if (p_rpt == NULL)
     {
         APPL_TRACE_ERROR("bta_hh_le_write_rpt: no matching report");
+        GKI_freebuf(p_buf);
         return;
     }