diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-10 18:02:34 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-10 18:02:34 +0800 |
commit | 6f6b25f482cb780a0136b387b68d2926e069b3e3 (patch) | |
tree | 5ef7a8b0f7a1212fe3d9e3f74be7ac2ed1d8c207 /mbbsd | |
parent | 51045ddd29b6f52b37e75d27104ae6ddce25206a (diff) | |
download | pttbbs-6f6b25f482cb780a0136b387b68d2926e069b3e3.tar pttbbs-6f6b25f482cb780a0136b387b68d2926e069b3e3.tar.gz pttbbs-6f6b25f482cb780a0136b387b68d2926e069b3e3.tar.bz2 pttbbs-6f6b25f482cb780a0136b387b68d2926e069b3e3.tar.lz pttbbs-6f6b25f482cb780a0136b387b68d2926e069b3e3.tar.xz pttbbs-6f6b25f482cb780a0136b387b68d2926e069b3e3.tar.zst pttbbs-6f6b25f482cb780a0136b387b68d2926e069b3e3.zip |
r2586@m722: kcwu | 2005-03-10 18:01:58 +0800
don't forget to fclose()
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2588 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/file.c b/mbbsd/file.c index 1c934bfb..d0e7d097 100644 --- a/mbbsd/file.c +++ b/mbbsd/file.c @@ -90,8 +90,10 @@ int file_exist_record(char *file, char *string) return 0; while (fgets(buf, STRLEN, fp)) { - if ((ptr = strtok(buf, str_space)) && !strcasecmp(ptr, string)) + if ((ptr = strtok(buf, str_space)) && !strcasecmp(ptr, string)) { + fclose(fp); return 1; + } } fclose(fp); return 0; |