command_ioctl() leaked the root directory's file descriptor.
This commit is contained in:
@@ -1195,6 +1195,9 @@ command_ioctl(int argc, const char* const* argv)
|
|||||||
return rootDir;
|
return rootDir;
|
||||||
|
|
||||||
fssh_status_t status = _kern_ioctl(rootDir, atoi(argv[1]), NULL, 0);
|
fssh_status_t status = _kern_ioctl(rootDir, atoi(argv[1]), NULL, 0);
|
||||||
|
|
||||||
|
_kern_close(rootDir);
|
||||||
|
|
||||||
if (status != FSSH_B_OK) {
|
if (status != FSSH_B_OK) {
|
||||||
fprintf(stderr, "Error: ioctl failed: %s\n", fssh_strerror(status));
|
fprintf(stderr, "Error: ioctl failed: %s\n", fssh_strerror(status));
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
Reference in New Issue
Block a user