1
0
mirror of https://github.com/fluencelabs/redis synced 2025-07-31 16:31:58 +00:00

Add error check for writing RDB checksum

Closes 
This commit is contained in:
yoav
2012-12-31 00:44:30 +02:00
committed by antirez
parent 233d24a737
commit 0a98b21f65

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