Free buf early - dedup - deduplicating backup program
HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 7033c4f6f1f3be92781ded542ba67e5c1a1b0b27
DIR parent ca6087f9ea02fe655dfb1db5ef4bbcb45528baa5
HTML Author: sin <sin@2f30.org>
Date: Thu, 16 May 2019 14:42:29 +0300
Free buf early
Diffstat:
M block.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
DIR diff --git a/block.c b/block.c
@@ -158,12 +158,10 @@ bcheck(struct bctx *bctx, unsigned char *md)
return -1;
}
- if (memcmp(tmp, md, MDSIZE) != 0) {
- free(buf);
- return 1;
- }
-
free(buf);
+
+ if (memcmp(tmp, md, MDSIZE) != 0)
+ return 1;
return 0;
}