From: Nick Porter Date: Tue, 16 Apr 2024 18:37:06 +0000 (+0100) Subject: Tidy up X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf7d094a8825f8fe0b65c5029cd807fcbb780d41;p=thirdparty%2Ffreeradius-server.git Tidy up --- diff --git a/src/lib/server/module_rlm.c b/src/lib/server/module_rlm.c index 59ae0680d71..b0c063daa35 100644 --- a/src/lib/server/module_rlm.c +++ b/src/lib/server/module_rlm.c @@ -639,10 +639,7 @@ module_instance_t *module_rlm_by_name_and_method(module_method_t *method, call_e * We have a module, but the caller doesn't care about * method or names, so just return the module. */ - if (!method || !method_name1 || !method_name2) { - talloc_free(inst_name); - return mi; - } + if (!method || !method_name1 || !method_name2) goto finish; /* * We MAY have two names. @@ -655,8 +652,7 @@ module_instance_t *module_rlm_by_name_and_method(module_method_t *method, call_e if (!mrlm->method_names) { *name1 = name + (p - inst_name); *name2 = NULL; - talloc_free(inst_name); - return mi; + goto finish; } /* @@ -699,17 +695,13 @@ module_instance_t *module_rlm_by_name_and_method(module_method_t *method, call_e /* * Return the found module. */ - talloc_free(inst_name); - return mi; + goto finish; } /* * We CANNOT have '.' in method names. */ - if (strchr(q + 1, '.') != 0) { - talloc_free(inst_name); - return mi; - } + if (strchr(q + 1, '.') != 0) goto finish; len = q - p;