Diff between 4fefa24097e45153f99cabbc70534d69a2a35ecd and 18fc3abad28cccd2ac7e31963502973af8b86216

Changed Files

File Additions Deletions Status
profiles/audio/a2dp.c +3 -2 modified

Full Patch

diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index f761dbe..d66c22b 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -2668,8 +2668,6 @@ struct a2dp_sep *a2dp_add_sep(struct btd_adapter *adapter, uint8_t type,
 	sep->codec = codec;
 	sep->type = type;
 	sep->delay_reporting = delay_reporting;
-	sep->user_data = user_data;
-	sep->destroy = destroy;
 
 	if (type == AVDTP_SEP_TYPE_SOURCE) {
 		l = &server->sources;
@@ -2713,6 +2711,9 @@ struct a2dp_sep *a2dp_add_sep(struct btd_adapter *adapter, uint8_t type,
 add:
 	*l = g_slist_append(*l, sep);
 
+	sep->user_data = user_data;
+	sep->destroy = destroy;
+
 	if (err)
 		*err = 0;
 	return sep;