This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch main
in repository gfs2-utils.
commit 864fa4013c0420df6ffd3c7f459d6939b1c8bde0
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Thu Mar 17 12:17:12 2022 +0000
Use calloc in test_rgrps_write_final()
Silence a valgrind warning of uninitialized data.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/check_rgrp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gfs2/libgfs2/check_rgrp.c b/gfs2/libgfs2/check_rgrp.c
index 1b3b1878..23f267aa 100644
--- a/gfs2/libgfs2/check_rgrp.c
+++ b/gfs2/libgfs2/check_rgrp.c
@@ -141,7 +141,7 @@ START_TEST(test_rgrps_write_final)
lgfs2_rindex_out(rg, &ri);
addr = be64_to_cpu(ri.ri_addr);
- buf = malloc(4096);
+ buf = calloc(1, 4096);
ck_assert(buf != NULL);
memset(buf, 0xff, sizeof(rgrp));
ck_assert(pwrite(sdp->device_fd, buf, 4096, addr * 4096) == 4096);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by date