diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-24 19:57:17 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-24 19:57:17 +0200 |
commit | 8e197d62cd3e0a62714235b506b5f12d2aa709cf (patch) | |
tree | fc411cc6f95038173ba014d81b4b1a8397440e67 /src | |
parent | cd7016b5320ae4274dbbbc829b5fe7f7ae1d568a (diff) |
Fix a few more sdp_record_t memory leaks
Diffstat (limited to 'src')
-rw-r--r-- | src/sdpd-service.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sdpd-service.c b/src/sdpd-service.c index 826eb104..a5c8c79b 100644 --- a/src/sdpd-service.c +++ b/src/sdpd-service.c @@ -606,6 +606,9 @@ success: bt_put_unaligned(htonl(rec->handle), (uint32_t *) rsp->data); rsp->data_size = sizeof(uint32_t); + if (rec) + sdp_record_free(rec); + return 0; invalid: @@ -647,10 +650,11 @@ int service_update_req(sdp_req_t *req, sdp_buf_t *rsp) SDPDBG("SvcRecOld : %p", orec); SDPDBG("Failure to update, restore old value"); - if (nrec) - sdp_record_free(nrec); status = SDP_INVALID_SYNTAX; } + + if (nrec) + sdp_record_free(nrec); } else status = SDP_INVALID_RECORD_HANDLE; |