diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-12-15 14:40:01 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-16 14:46:18 -0500 |
commit | 8e84378f94a7ef289585e756e529cad5088e17b9 (patch) | |
tree | 234907cd53e9da154e2bd90b73fc8beadff201be /src | |
parent | 340f61052d540f73f14f3dd2ebcf2aee1cde99b3 (diff) | |
download | sssd-8e84378f94a7ef289585e756e529cad5088e17b9.tar.gz sssd-8e84378f94a7ef289585e756e529cad5088e17b9.tar.xz sssd-8e84378f94a7ef289585e756e529cad5088e17b9.zip |
DP: Remove processed callbacks
Diffstat (limited to 'src')
-rw-r--r-- | src/responder/common/responder_dp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c index 93c7cae4d..f51e2496a 100644 --- a/src/responder/common/responder_dp.c +++ b/src/responder/common/responder_dp.c @@ -599,7 +599,7 @@ static void sss_dp_get_account_int_done(DBusPendingCall *pending, void *ptr) int ret; struct tevent_req *req; struct sss_dp_req *sdp_req; - struct sss_dp_callback *cb; + struct sss_dp_callback *cb, *prevcb = NULL; struct dp_get_account_int_state *state; struct dp_get_account_state *cb_state; @@ -645,9 +645,11 @@ static void sss_dp_get_account_int_done(DBusPendingCall *pending, void *ptr) tevent_req_error(cb->req, ret); } - /* Remove each callback from the list as it's replied to */ - DLIST_REMOVE(sdp_req->cb_list, cb); + /* Freeing the request removes it from the list */ + if (prevcb) talloc_free(prevcb); + prevcb = cb; } + talloc_free(prevcb); /* We're done with this request. Free the sdp_req * This will clean up the hash table entry as well |