summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-04-16 17:25:13 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-04-16 17:25:13 +0800
commitbf5bb58098672331ee487d41013d69fb41395082 (patch)
treeddc0681bcb715188640f6eb718bd7de4a4d45b99
parent232f7d8b0ffc7e1c122873d3660121ad2b9363d0 (diff)
downloadpttbbs-bf5bb58098672331ee487d41013d69fb41395082.tar
pttbbs-bf5bb58098672331ee487d41013d69fb41395082.tar.gz
pttbbs-bf5bb58098672331ee487d41013d69fb41395082.tar.bz2
pttbbs-bf5bb58098672331ee487d41013d69fb41395082.tar.lz
pttbbs-bf5bb58098672331ee487d41013d69fb41395082.tar.xz
pttbbs-bf5bb58098672331ee487d41013d69fb41395082.tar.zst
pttbbs-bf5bb58098672331ee487d41013d69fb41395082.zip
may be not closed
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@799 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/friend.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c
index 88cc28f7..9876b396 100644
--- a/mbbsd/friend.c
+++ b/mbbsd/friend.c
@@ -1,4 +1,4 @@
-/* $Id: friend.c,v 1.15 2003/01/19 16:06:06 kcwu Exp $ */
+/* $Id: friend.c,v 1.16 2003/04/16 09:25:13 victor Exp $ */
#include "bbs.h"
/* ------------------------------------- */
@@ -220,10 +220,12 @@ friend_delete(char *uident, int type)
while (fgets(genbuf, STRLEN, fp))
if ((genbuf[0] > ' ') && strncmp(genbuf, uident, length))
fputs(genbuf, nfp);
- fclose(fp);
- fclose(nfp);
Rename(fnnew, fn);
}
+ if(fp)
+ fclose(fp);
+ if(nfp)
+ fclose(nfp);
}
static void