Am 14.03.2015 um 04:42 schrieb Shannon Zhao:
Free data in function sdp_attr_write after use.
Signed-off-by: Shannon Zhao <zhaoshengl...@huawei.com>
Signed-off-by: Shannon Zhao <shannon.z...@linaro.org>
---
hw/bt/sdp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/bt/sdp.c b/hw/bt/sdp.c
index 218e075..8e6d5e3 100644
--- a/hw/bt/sdp.c
+++ b/hw/bt/sdp.c
@@ -735,6 +735,7 @@ static void sdp_service_record_build(struct
sdp_service_record_s *record,
record->attribute_list[record->attributes ++].len = len;
data += len;
}
+ g_free(data);
No, here more work is needed. data is no longer the original data,
because two lines above it is modified.
/* Sort the attribute list by the AttributeID */
qsort(record->attribute_list, record->attributes,