Commit 51c1d40d authored by antirez's avatar antirez
Browse files

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.
parent eee878cb
...@@ -180,7 +180,7 @@ int redis_check_rdb(char *rdbfilename) { ...@@ -180,7 +180,7 @@ int redis_check_rdb(char *rdbfilename) {
char buf[1024]; char buf[1024];
long long expiretime, now = mstime(); long long expiretime, now = mstime();
FILE *fp; FILE *fp;
rio rdb; static rio rdb; /* Pointed by global struct riostate. */
if ((fp = fopen(rdbfilename,"r")) == NULL) return 1; if ((fp = fopen(rdbfilename,"r")) == NULL) return 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment