diff -u libnss-ldap-251/ldap-nss.c libnss-ldap-251/ldap-nss.c --- libnss-ldap-251/ldap-nss.c +++ libnss-ldap-251/ldap-nss.c @@ -2001,10 +2001,6 @@ } else { - if (ctx->ec_res != NULL) - { - ldap_msgfree (ctx->ec_res); - } if (ctx->ec_cookie != NULL) { ber_bvfree (ctx->ec_cookie); @@ -2013,6 +2009,10 @@ { ldap_abandon (__session.ls_conn, ctx->ec_msgid); } + if (ctx->ec_res != NULL) + { + ldap_msgfree (ctx->ec_res); + } } ctx->ec_cookie = NULL; diff -u libnss-ldap-251/debian/changelog libnss-ldap-251/debian/changelog --- libnss-ldap-251/debian/changelog +++ libnss-ldap-251/debian/changelog @@ -1,3 +1,11 @@ +libnss-ldap (251-7.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix a double-free in _nss_ldap_ent_context_init_locked() when we + have an existing query to dispose of. Potentially closes: #366172. + + -- Steve Langasek Mon, 13 Nov 2006 15:14:46 -0800 + libnss-ldap (251-7) unstable; urgency=low * Meh, correctly include escape-fixing NMU