Skip to content

Commit

Permalink
to_cast is not always talloced
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Sep 4, 2023
1 parent 54b71c9 commit 9e0fa80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/redis/redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ int fr_redis_reply_to_value_box(TALLOC_CTX *ctx, fr_value_box_t *out, redisReply
if (shallow) {
fr_value_box_bstrndup_shallow(to_cast, NULL, reply->str, reply->len, true);
} else {
if (fr_value_box_bstrndup(to_cast, to_cast, NULL, reply->str, reply->len, true) < 0) return -1;
if (fr_value_box_bstrndup(to_cast->talloced ? to_cast : ctx, to_cast, NULL,
reply->str, reply->len, true) < 0) return -1;
}
break;

Expand Down

0 comments on commit 9e0fa80

Please sign in to comment.