summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-sdp.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-09-21 21:22:41 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-09-21 21:22:41 +0000
commitd0ad1ca444111052434130ea7fb810319bff8f63 (patch)
tree61cc2ec22d0d50e9d73f067430a47838ea3e7f63 /hcid/dbus-sdp.c
parentd97e5a6a819ea0f191c5d660215b6791a5efa4e8 (diff)
removed memory leak
Diffstat (limited to 'hcid/dbus-sdp.c')
-rw-r--r--hcid/dbus-sdp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index a3a9bc27..6a919144 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -1516,6 +1516,10 @@ static void get_rec_with_handle_comp_cb(uint8_t type, uint16_t err,
failed:
get_record_data_call_cb(ctxt->priv, rec, cb_err);
+
+ /* FIXME: when start using cache don't free the service record */
+ if (rec)
+ sdp_record_free(rec);
get_record_data_free(ctxt->priv);
transaction_context_free(ctxt);
}
@@ -1598,7 +1602,6 @@ static void get_rec_with_uuid_comp_cb(uint8_t type, uint16_t err,
struct transaction_context *ctxt = udata;
get_record_data_t *d = ctxt->priv;
int csrc, tsrc, cb_err = 0;
- sdp_record_t *rec = NULL;
uint32_t *handle;
uint8_t *pdata;
@@ -1648,7 +1651,7 @@ static void get_rec_with_uuid_comp_cb(uint8_t type, uint16_t err,
return;
failed:
- get_record_data_call_cb(d, rec, cb_err);
+ get_record_data_call_cb(d, NULL, cb_err);
get_record_data_free(d);
transaction_context_free(ctxt);
}