tFree buf early - dedup - deduplicating backup program
(HTM) git clone git://git.z3bra.org/dedup.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 7033c4f6f1f3be92781ded542ba67e5c1a1b0b27
(DIR) parent ca6087f9ea02fe655dfb1db5ef4bbcb45528baa5
(HTM) 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
t@@ -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;
}