diff options
Diffstat (limited to 'nslcd')
-rw-r--r-- | nslcd/ldap-nss.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nslcd/ldap-nss.c b/nslcd/ldap-nss.c index 17b91a8..63c70b0 100644 --- a/nslcd/ldap-nss.c +++ b/nslcd/ldap-nss.c @@ -704,18 +704,18 @@ void _nss_ldap_ent_context_cleanup(struct ent_context *context) { if (context==NULL) return; - /* free read messages */ - if (context->ec_res!=NULL) - { - ldap_msgfree(context->ec_res); - context->ec_res=NULL; - } /* abandon the search if there were more results to fetch */ if ((context->ec_msgid>-1)&&(do_result_async(context)==NSS_STATUS_SUCCESS)) { ldap_abandon(context->session->ls_conn,context->ec_msgid); context->ec_msgid=-1; } + /* free read messages */ + if (context->ec_res!=NULL) + { + ldap_msgfree(context->ec_res); + context->ec_res=NULL; + } /* clean up cookie */ if (context->ec_cookie!=NULL) { |