diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/providers/ldap/sdap_async.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/providers/ldap/sdap_async.c b/server/providers/ldap/sdap_async.c index 9e35c643..99d82979 100644 --- a/server/providers/ldap/sdap_async.c +++ b/server/providers/ldap/sdap_async.c @@ -102,7 +102,9 @@ static void sdap_handle_release(struct sdap_handle *sh) while (sh->ops) { op = sh->ops; op->callback(op, NULL, EIO, op->data); - talloc_free(op); + /* calling the callback may result in freeing the op */ + /* check if it is still the same or avoid freeing */ + if (op == sh->ops) talloc_free(op); } ldap_unbind_ext(sh->ldap, NULL, NULL); |