]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tools/cgdelete: fix coverity wrong argument size warning
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 18 May 2022 17:09:51 +0000 (11:09 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 18 May 2022 17:10:05 +0000 (11:10 -0600)
commit2045fcd6b3428f1b1ca226974259e00399049472
tree7e7ccd67d03de4dc78396610e1739d6d19eabea7
parent887bae0df3c68c73375b822931acc7aff5add87e
tools/cgdelete: fix coverity wrong argument size warning

Fix a wrong argument size, reported by Coverity tool:

CID 1412122 (#1 of 1): Wrong sizeof argument (SIZEOF_MISMATCH)
suspicious_sizeof: Passing argument 8UL
/* sizeof (struct ext_cgroup_record *) */ to function calloc and then
casting the return value to struct ext_cgroup_record * is suspicious.

Also, fix the typo in the variable name, that's being allocated memory.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/tools/cgdelete.c