summaryrefslogtreecommitdiff
path: root/src/responder/common
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-03-17 14:53:17 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-03-17 16:41:01 -0400
commitf1bc4e8b9daf04a5cb4b9464021bb9e816eed3ea (patch)
treee567f20493ad395a5f5b251f1f69cac6410a7789 /src/responder/common
parent1d065874a1aa1db06994a16dae1a78555fabf776 (diff)
downloadsssd-f1bc4e8b9daf04a5cb4b9464021bb9e816eed3ea.tar.gz
sssd-f1bc4e8b9daf04a5cb4b9464021bb9e816eed3ea.tar.bz2
sssd-f1bc4e8b9daf04a5cb4b9464021bb9e816eed3ea.zip
Fix a series of memory leaks in the SBUS
Diffstat (limited to 'src/responder/common')
-rw-r--r--src/responder/common/responder_dp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c
index 001661ca..9f8f5263 100644
--- a/src/responder/common/responder_dp.c
+++ b/src/responder/common/responder_dp.c
@@ -464,6 +464,7 @@ static int sss_dp_send_acct_req_create(struct resp_ctx *rctx,
ret = sbus_conn_send(be_conn->conn, msg, timeout,
sss_dp_send_acct_callback,
sdp_req, &pending_reply);
+ dbus_message_unref(msg);
if (ret != EOK) {
/*
* Critical Failure
@@ -471,7 +472,6 @@ static int sss_dp_send_acct_req_create(struct resp_ctx *rctx,
* We'll drop it using the default destructor.
*/
DEBUG(0, ("D-BUS send failed.\n"));
- dbus_message_unref(msg);
return EIO;
}
@@ -481,7 +481,6 @@ static int sss_dp_send_acct_req_create(struct resp_ctx *rctx,
if (callback) {
cb = talloc_zero(callback_memctx, struct sss_dp_callback);
if (!cb) {
- dbus_message_unref(msg);
talloc_zfree(sdp_req);
return ENOMEM;
}
@@ -493,8 +492,6 @@ static int sss_dp_send_acct_req_create(struct resp_ctx *rctx,
talloc_set_destructor((TALLOC_CTX *)cb, sss_dp_callback_destructor);
}
- dbus_message_unref(msg);
-
*ndp = sdp_req;
return EOK;