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.
This commit is contained in:
antirez 2016-07-06 19:12:24 +02:00
parent 0a881fbe91
commit 6360073270

View File

@ -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;