From 4938052f6b65a44b8832c5f7e530d84ed4277a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20S=C3=B6derqvist?= Date: Tue, 13 Apr 2021 19:14:12 +0200 Subject: [PATCH] Small doc fix for stream module API (#8757) In a code example, using RedisModule_FreeString instead of RedisModule_Free makes it behave correctly regardless of whether automatic memory is used or not. --- src/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/module.c b/src/module.c index f24c0af2a..bcc9f667b 100644 --- a/src/module.c +++ b/src/module.c @@ -3398,8 +3398,8 @@ int RM_StreamDelete(RedisModuleKey *key, RedisModuleStreamID *id) { * // * // ... Do stuff ... * // - * RedisModule_Free(field); - * RedisModule_Free(value); + * RedisModule_FreeString(ctx, field); + * RedisModule_FreeString(ctx, value); * } * } * RedisModule_StreamIteratorStop(key);