Skip to content

Commit

Permalink
redis_check_rdb(): the rio structure must be global.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
antirez committed Jul 6, 2016
1 parent eee878c commit 51c1d40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/redis-check-rdb.c
Expand Up @@ -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;

Expand Down

0 comments on commit 51c1d40

Please sign in to comment.