summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-17 02:44:23 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-17 02:44:23 +0800
commitd979cd7c08a88b0721938e9996a58c25cadd45f4 (patch)
treecb151fe762732d15c941c2d6cb53241168f3ab9f
parent4919622d4c6266a0a38bd3c4e77c5d29ddd54175 (diff)
downloadpttbbs-d979cd7c08a88b0721938e9996a58c25cadd45f4.tar
pttbbs-d979cd7c08a88b0721938e9996a58c25cadd45f4.tar.gz
pttbbs-d979cd7c08a88b0721938e9996a58c25cadd45f4.tar.bz2
pttbbs-d979cd7c08a88b0721938e9996a58c25cadd45f4.tar.lz
pttbbs-d979cd7c08a88b0721938e9996a58c25cadd45f4.tar.xz
pttbbs-d979cd7c08a88b0721938e9996a58c25cadd45f4.tar.zst
pttbbs-d979cd7c08a88b0721938e9996a58c25cadd45f4.zip
don't forget to fclose
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2199 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/admin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index de40efe1..f77059c9 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -67,8 +67,10 @@ search_key_user(char *passwdfile, int mode)
clear();
getdata(0, 0, mode ? "請輸入使用者關鍵字[電話|地址|姓名|身份證|上站地點|"
"email|小雞id] :" : "請輸入id :", key, sizeof(key), DOECHO);
- if(!key[0])
+ if(!key[0]) {
+ fclose(fp1);
return 0;
+ }
while ((fread(&user, sizeof(user), 1, fp1)) > 0 && coun < MAX_USERS) {
if (!(++coun & 15)) {
move(1, 0);