lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1254135113-28212-1-git-send-email-bergwolf@gmail.com>
Date:	Mon, 28 Sep 2009 18:51:53 +0800
From:	Peng Tao <bergwolf@...il.com>
To:	linux-ext4@...r.kernel.org
Cc:	Theodore Ts'o <tytso@....edu>
Subject: [PATCH] debugfs: add matching fclose

If the cmd_file is not stdin, we should close the file handle via fclose().
Thanks David Binderman to point this out.

Addresses-Novell-Bugzilla: #524526

Signed-off-by: Peng Tao <bergwolf@...il.com>
---
 debugfs/debugfs.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 93227e3..7f75788 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -2133,6 +2133,8 @@ static int source_file(const char *cmd_file, int sci_idx)
 			exit_status++;
 		}
 	}
+	if (f != stdin)
+		fclose(f);
 	return exit_status;
 }
 
-- 
1.6.5.rc2.262.g5224f

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ