summaryrefslogtreecommitdiffstats
path: root/src/sdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp.c')
-rw-r--r--src/sdp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sdp.c b/src/sdp.c
index 4270ac83..af2cf162 100644
--- a/src/sdp.c
+++ b/src/sdp.c
@@ -2629,13 +2629,14 @@ int sdp_device_record_update(sdp_session_t *session, bdaddr_t *device, const sdp
reqsize += sizeof(uint32_t);
p += sizeof(uint32_t);
- if (0 > sdp_gen_record_pdu(rec, &pdu)) {
+ if (sdp_gen_record_pdu(rec, &pdu) < 0) {
errno = ENOMEM;
status = -1;
goto end;
}
memcpy(p, pdu.data, pdu.data_size);
reqsize += pdu.data_size;
+ free(pdu.data);
reqhdr->plen = htons(reqsize - sizeof(sdp_pdu_hdr_t));
status = sdp_send_req_w4_rsp(session, reqbuf, rspbuf, reqsize, &rspsize);