summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2020-01-17 21:02:00 -0800
committerBart Van Assche <bvanassche@acm.org>2020-01-17 22:04:39 -0800
commit655ca10a708318bb22023146fe3dc338d25b777d (patch)
tree159eb47b1e4502f70153f9db4314bb1f069079b9 /lib
parented24e32c0fcccbf68cbb8ad853f99d171842f270 (diff)
downloadfio-655ca10a708318bb22023146fe3dc338d25b777d.tar.gz
fio-655ca10a708318bb22023146fe3dc338d25b777d.tar.bz2
lib/memcpy: Suppress a Coverity leak report for setup_tests()
Suppress the following Coverity memory leak complaint: CID 169324 (#1 of 1): Resource leak (RESOURCE_LEAK) 7. leaked_storage: Variable src going out of scope leaks the storage it points to. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/memcpy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/memcpy.c b/lib/memcpy.c
index cf8572e2..a5521343 100644
--- a/lib/memcpy.c
+++ b/lib/memcpy.c
@@ -201,6 +201,9 @@ static int setup_tests(void)
void *src, *dst;
int i;
+ if (!tests[0].name)
+ return 0;
+
src = malloc(BUF_SIZE);
dst = malloc(BUF_SIZE);
if (!src || !dst) {