Skip to content

Commit 9c83cbd

Browse files
committed
Fix the RedisModule_CloseKey problem - remove the call for freeing the runkey in DagOp free function. Closing the model key no longer leeds to a crash.
1 parent 34d153b commit 9c83cbd

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

src/DAG/dag_parser.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ int DAG_CommandParser(RedisModuleCtx *ctx, RedisModuleString **argv, int argc, b
223223
RedisModuleKey *modelKey;
224224
const int status = RAI_GetModelFromKeyspace(ctx, argv[arg_pos + 1], &modelKey, &mto,
225225
REDISMODULE_READ);
226-
RedisModule_OpenKey(ctx, argv[arg_pos + 1], REDISMODULE_READ);
227226
if (status == REDISMODULE_ERR) {
228227
RAI_FreeRunInfo(rinfo);
229228
RedisModule_ReplyWithError(ctx, "ERR Model not found");
@@ -244,7 +243,6 @@ int DAG_CommandParser(RedisModuleCtx *ctx, RedisModuleString **argv, int argc, b
244243
RedisModuleKey *scriptKey;
245244
const int status = RAI_GetScriptFromKeyspace(ctx, argv[arg_pos + 1], &scriptKey,
246245
&sto, REDISMODULE_READ);
247-
RedisModule_OpenKey(ctx, argv[arg_pos + 1], REDISMODULE_READ);
248246
if (status == REDISMODULE_ERR) {
249247
RAI_FreeRunInfo(rinfo);
250248
return REDISMODULE_ERR;

src/run_info.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ int RAI_ShallowCopyDagRunInfo(RedisAI_RunInfo **result, RedisAI_RunInfo *src) {
145145
void RAI_FreeDagOp(RAI_DagOp *dagOp) {
146146
if (dagOp) {
147147
RAI_FreeError(dagOp->err);
148-
if (dagOp->runkey) {
149-
RedisModule_FreeString(NULL, dagOp->runkey);
150-
}
151148
if (dagOp->argv) {
152149
for (size_t i = 0; i < array_len(dagOp->argv); i++) {
153150
RedisModule_FreeString(NULL, dagOp->argv[i]);

0 commit comments

Comments
 (0)