Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4766c25

Browse files
committed
CID 157199
1 parent 0438ab4 commit 4766c25

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

redis_commands.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3064,9 +3064,9 @@ void redis_prefix_handler(INTERNAL_FUNCTION_PARAMETERS, RedisSock *redis_sock) {
30643064
}
30653065

30663066
if(redis_sock->prefix != NULL && redis_sock->prefix_len>0) {
3067-
redis_key_prefix(redis_sock, &key, &key_len);
3067+
int keyfree = redis_key_prefix(redis_sock, &key, &key_len);
30683068
RETVAL_STRINGL(key, key_len);
3069-
efree(key);
3069+
if (keyfree) efree(key);
30703070
} else {
30713071
RETURN_STRINGL(key, key_len);
30723072
}

0 commit comments

Comments
 (0)