diff options
author | antirez <antirez@gmail.com> | 2015-01-21 16:39:38 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-01-21 16:42:56 +0100 |
commit | e7aa5fb5ef5e106895261b9a7fc6e65874e22d7e (patch) | |
tree | 50109da3875b02e087dbfb6d25d8a6768f9b67de | |
parent | 8a41dae49fb6331a6999b958b76a3f29a4bbe7cd (diff) | |
download | redis-e7aa5fb5ef5e106895261b9a7fc6e65874e22d7e.tar.gz |
AOF rewrite: set iterator var to NULL when freed.
The cleanup code expects that if 'di' is not NULL, it is a valid
iterator that should be freed.
The result of this bug was a crash of the AOF rewriting process if an
error occurred after the DBs data are written and the iterator is no
longer valid.
-rw-r--r-- | src/aof.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1038,6 +1038,7 @@ int rewriteAppendOnlyFile(char *filename) { } } dictReleaseIterator(di); + di = NULL; } /* Make sure data will not remain on the OS's output buffers */ |