diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 20:42:27 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-01-20 20:42:27 +0000 |
commit | 7899df370a9395fe016f54a311e58487be04c66c (patch) | |
tree | bc928f0d20213fc4daa6d89a8d4e0d819b4233b4 /sdpd/service.c | |
parent | eeb436f3b83e749dd9d7ae1c123765188155aa9c (diff) |
Fix memory leaks
Diffstat (limited to 'sdpd/service.c')
-rw-r--r-- | sdpd/service.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sdpd/service.c b/sdpd/service.c index 0b4b0d8e..83844d68 100644 --- a/sdpd/service.c +++ b/sdpd/service.c @@ -353,11 +353,15 @@ int service_register_req(sdp_req_t *req, sdp_buf_t *rsp) if (rec->handle == 0xffffffff) { rec->handle = sdp_next_handle(); - if (rec->handle < 0x10000) + if (rec->handle < 0x10000) { + sdp_record_free(rec); goto invalid; + } } else { - if (sdp_record_find(rec->handle)) + if (sdp_record_find(rec->handle)) { + sdp_record_free(rec); goto invalid; + } } sdp_record_add(&req->device, rec); |