Diff between 1764cea5c7fd4f4a7af06c183822158c1e4c6fe7 and cc8e6ef63509ff69f8b2399802c6de320e957c2b

Changed Files

File Additions Deletions Status
profiles/audio/bap.c +4 -1 modified

Full Patch

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 3fcf21d..53e7b3e 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1174,6 +1174,7 @@ static bool parse_base(struct bap_data *bap_data, struct bt_iso_base *base,
 			if (!util_iov_pull_u8(&iov,
 						(void *)&l3_caps->iov_len)) {
 				free(l3_caps);
+				free(path);
 				ret = false;
 				goto group_fail;
 			}
@@ -1195,8 +1196,10 @@ static bool parse_base(struct bap_data *bap_data, struct bt_iso_base *base,
 					l2_caps, l3_caps, &matched_lpac,
 					&merged_caps);
 
-			if (matched_lpac == NULL || merged_caps == NULL)
+			if (matched_lpac == NULL || merged_caps == NULL) {
+				free(path);
 				continue;
+			}
 
 			create_stream_for_bis(bap_data, matched_lpac, qos,
 					merged_caps, meta, path);