diff options
author | antirez <antirez@gmail.com> | 2016-07-06 19:12:24 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-07-06 19:12:24 +0200 |
commit | 51c1d40d0854ae2677c26ed039d01f5ce0f129a3 (patch) | |
tree | a28f5a5808432827e2a68ecd1b328433e70551aa | |
parent | eee878cbc5c6c02e2e3e4073d71de2c970305676 (diff) | |
download | redis-51c1d40d0854ae2677c26ed039d01f5ce0f129a3.tar.gz |
redis_check_rdb(): the rio structure must be global.
The rio structure is referenced in the global 'riostate' structure
in order for the logging functions to be always able to access the state
of the "pseudo-loading" of the RDB, needed for the check.
Courtesy of Valgrind.
-rw-r--r-- | src/redis-check-rdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis-check-rdb.c b/src/redis-check-rdb.c index 53fb67b80..08be40f6a 100644 --- a/src/redis-check-rdb.c +++ b/src/redis-check-rdb.c @@ -180,7 +180,7 @@ int redis_check_rdb(char *rdbfilename) { char buf[1024]; long long expiretime, now = mstime(); FILE *fp; - rio rdb; + static rio rdb; /* Pointed by global struct riostate. */ if ((fp = fopen(rdbfilename,"r")) == NULL) return 1; |