Diff between a0b7ee93a2f375c26ff91997298c5b5bdcee0f43 and 4a939b5e8a213005ed1fc8a25e41524c720f59cd

Changed Files

File Additions Deletions Status
android/gatt.c +4 -0 modified

Full Patch

diff --git a/android/gatt.c b/android/gatt.c
index 72ecbf9..b426c16 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1245,11 +1245,15 @@ static void discover_primary_cb(uint8_t status, GSList *services,
 	if (status) {
 		error("gatt: Discover all primary services failed: %s",
 							att_ecode2str(status));
+		free(cb_data);
+
 		return;
 	}
 
 	if (!services) {
 		info("gatt: No primary services found");
+		free(cb_data);
+
 		return;
 	}