summaryrefslogtreecommitdiff
path: root/src/lib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tests')
-rw-r--r--src/lib/tests/du_buff_test.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/tests/du_buff_test.c b/src/lib/tests/du_buff_test.c
index 2b7b5e55..bda1ca43 100644
--- a/src/lib/tests/du_buff_test.c
+++ b/src/lib/tests/du_buff_test.c
@@ -48,15 +48,20 @@ int du_buff_test(int argc, char ** argv)
if (dub == NULL)
return -1;
- if (k > DU_BLOCK_DATA_SIZE)
+ if (k > DU_BLOCK_DATA_SIZE) {
+ du_buff_destroy (dub);
continue;
+ }
- if (i - (j + k) > DU_BLOCK_DATA_SIZE)
+ if (i - (j + k) > DU_BLOCK_DATA_SIZE) {
+ du_buff_destroy (dub);
continue;
+ }
- if (du_buff_init(dub, k, bits, j) < 0)
+ if (du_buff_init(dub, k, bits, j) < 0) {
+ du_buff_destroy (dub);
return -1;
-
+ }
du_buff_destroy (dub);
}
}