Commit 0a98b21f authored by yoav's avatar yoav Committed by antirez
Browse files

Add error check for writing RDB checksum

Closes #857
parent 233d24a7
......@@ -688,7 +688,7 @@ int rdbSave(char *filename) {
* loading code skips the check in this case. */
cksum = rdb.cksum;
memrev64ifbe(&cksum);
rioWrite(&rdb,&cksum,8);
if (rioWrite(&rdb,&cksum,8) == 0) goto werr;
/* Make sure data will not remain on the OS's output buffers */
if (fflush(fp) == EOF) goto werr;
......
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