glusterfs
glusterfs copied to clipboard
Handle leak in bit-rot-stub
Description of problem: The handle 'fd_ctx->bad_object->dir' is created at syscall.c:149 by calling function 'sys_opendir' at bit-rot-stub.c:2690 https://github.com/gluster/glusterfs/blob/929d71b084e1e7f995d3a2884d16438108f6f621/xlators/features/bit-rot/src/stub/bit-rot-stub.c#L2690 and lost at bit-rot-stub.c:2698.
Do we need to add sys_closedir(fd_ctx->bad_object.dir);
https://github.com/gluster/glusterfs/blob/929d71b084e1e7f995d3a2884d16438108f6f621/xlators/features/bit-rot/src/stub/bit-rot-stub.c#L2698
This is a svace static analyzer warning
The exact command to reproduce the issue:
The full output of the command that failed:
Expected results:
Mandatory info:
Additional info:
- Debian / 10.5: