]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Set result to NULL after freeing so we don't get double free
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 22 Jun 2015 02:28:20 +0000 (22:28 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 22 Jun 2015 02:28:20 +0000 (22:28 -0400)
src/modules/rlm_ldap/sasl.c

index c20b5af13e25847f665d9d9b57bb2406c83ec342..0cd7e86ba25d2093566f33df9020a3e54c454df0 100644 (file)
@@ -129,6 +129,7 @@ ldap_rcode_t rlm_ldap_sasl_interactive(rlm_ldap_t const *inst, REQUEST *request,
                                                 _sasl_interact, &sasl_ctx, result,
                                                 &mech, &msgid);
                ldap_msgfree(result);   /* We always need to free the old message */
+               result = NULL;
 
                /*
                 *      If ldap_sasl_interactive_bind indicates it didn't want