diff options
| author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-04-26 19:47:36 +0000 | 
|---|---|---|
| committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-04-26 19:47:36 +0000 | 
| commit | c5621bfbf9071ed359d904bdd91308f6599dc5e5 (patch) | |
| tree | beb74601304ed9fb9bcf01ceadf85c36834a47b3 /src | |
| parent | 5f17af319f0caee2243c5471a6500742ad7d6576 (diff) | |
Fixed memory leak
Diffstat (limited to 'src')
| -rw-r--r-- | src/sdp.c | 3 | 
1 files changed, 2 insertions, 1 deletions
@@ -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);  | 
