]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't leak if failed the MS-CHAP password handle
authorJorge Pereira <jpereira@freeradius.org>
Mon, 30 Sep 2019 23:15:25 +0000 (20:15 -0300)
committerAlan DeKok <aland@freeradius.org>
Tue, 1 Oct 2019 12:58:20 +0000 (08:58 -0400)
src/modules/rlm_mschap/rlm_mschap.c

index 0cef811f2f2e66eb08a226b3f634496b0df22461..687b284ececdfabf75a5c806e745b0f7373d6d41 100644 (file)
@@ -1992,7 +1992,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authenticate(void *instance, UNUSED void
                uint8_t         *p;
 
                rcode = mschap_process_cpw_request(instance, request, cpw, nt_password);
-               if (rcode != RLM_MODULE_OK) return rcode;
+               if (rcode != RLM_MODULE_OK) goto finish;
 
                /*
                 *      Clear any expiry bit so the user can now login;