From: Alan T. DeKok Date: Sat, 5 Dec 2020 14:43:50 +0000 (-0500) Subject: set values only on success X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2940cf9c080c895f61a45e16b1b3ee48d6437c9b;p=thirdparty%2Ffreeradius-server.git set values only on success --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index 9509c16afef..ec60a695d35 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -922,10 +922,11 @@ static int dictionary_load_common(command_result_t *result, command_file_ctx_t * } ret = fr_dict_protocol_afrom_file(&dict, name, dir); - cc->tmpl_rules.dict_def = dict; talloc_free(tmp); if (ret < 0) RETURN_COMMAND_ERROR(); + cc->tmpl_rules.dict_def = dict; + /* * Dump the dictionary if we're in super debug mode */