From: Nick Porter Date: Thu, 13 Apr 2023 16:18:33 +0000 (+0100) Subject: Free previous redis result before retrieving another X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2625b8d9be875ac97cec70af805e71dffe15ebe3;p=thirdparty%2Ffreeradius-server.git Free previous redis result before retrieving another --- diff --git a/src/modules/rlm_redis/rlm_redis.c b/src/modules/rlm_redis/rlm_redis.c index e741cf776a..3ac92c2150 100644 --- a/src/modules/rlm_redis/rlm_redis.c +++ b/src/modules/rlm_redis/rlm_redis.c @@ -426,6 +426,7 @@ static xlat_action_t redis_lua_func_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, REXDENT(); } if (!func->read_only) { + fr_redis_reply_free(&reply); reply = redisCommandArgv(conn->handle, argc, argv, arg_len); status = fr_redis_command_status(conn, reply); } else if (redis_command_read_only(&status, &reply, request, conn, argc, argv, arg_len) == -2) { @@ -466,6 +467,7 @@ static xlat_action_t redis_lua_func_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out, * we just load the script and try again. */ if (!func->read_only) { + fr_redis_reply_free(&reply); reply = redisCommandArgv(conn->handle, NUM_ELEMENTS(script_load_argv), script_load_argv, script_load_arg_len); status = fr_redis_command_status(conn, reply);