summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-17 16:49:34 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-01-17 16:49:34 +0800
commit24d97665ec13a9187d5a32155b5dc4b226514859 (patch)
treeed1dac02a4d3d7f63844bf3e5d3c6a5bf8874ee5
parent13692407ca4d01bfbc84f56c5e424d1b48847c2b (diff)
downloadpttbbs-24d97665ec13a9187d5a32155b5dc4b226514859.tar
pttbbs-24d97665ec13a9187d5a32155b5dc4b226514859.tar.gz
pttbbs-24d97665ec13a9187d5a32155b5dc4b226514859.tar.bz2
pttbbs-24d97665ec13a9187d5a32155b5dc4b226514859.tar.lz
pttbbs-24d97665ec13a9187d5a32155b5dc4b226514859.tar.xz
pttbbs-24d97665ec13a9187d5a32155b5dc4b226514859.tar.zst
pttbbs-24d97665ec13a9187d5a32155b5dc4b226514859.zip
free namelist after using immediately
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@624 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/proto.h3
-rw-r--r--mbbsd/board.c4
-rw-r--r--mbbsd/name.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/include/proto.h b/include/proto.h
index a844e483..708353c8 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -1,4 +1,4 @@
-/* $Id: proto.h,v 1.34 2003/01/16 14:38:35 kcwu Exp $ */
+/* $Id: proto.h,v 1.35 2003/01/17 08:49:34 kcwu Exp $ */
#ifndef INCLUDE_PROTO_H
#define INCLUDE_PROTO_H
@@ -314,6 +314,7 @@ int more(char *fpath, int promptend);
void usercomplete(char *prompt, char *data);
void namecomplete(char *prompt, char *data);
void AddNameList(char *name);
+void FreeNameList();
void CreateNameList();
int chkstr(char *otag, char *tag, char *name);
int InNameList(char *name);
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 138b93a9..3ac9396c 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.74 2003/01/17 08:42:46 kcwu Exp $ */
+/* $Id: board.c,v 1.75 2003/01/17 08:49:34 kcwu Exp $ */
#include "bbs.h"
#define BRC_STRLEN 15 /* Length of board name */
#define BRC_MAXSIZE 24576
@@ -566,6 +566,8 @@ search_board()
for (num = 0; num < brdnum; num++)
AddNameList(nbrd[num].bh->brdname);
namecomplete(MSG_SELECT_BOARD, genbuf);
+ FreeNameList();
+ toplev = NULL;
for (num = 0; num < brdnum; num++)
if (!strcasecmp(nbrd[num].bh->brdname, genbuf))
diff --git a/mbbsd/name.c b/mbbsd/name.c
index cbd872d9..ef1a4c5f 100644
--- a/mbbsd/name.c
+++ b/mbbsd/name.c
@@ -1,4 +1,4 @@
-/* $Id: name.c,v 1.14 2002/07/22 19:02:00 in2 Exp $ */
+/* $Id: name.c,v 1.15 2003/01/17 08:49:34 kcwu Exp $ */
#include "bbs.h"
static word_t *current = NULL;
@@ -42,7 +42,7 @@ UserSubArray(char cwbuf[][IDLEN + 1], char cwlist[][IDLEN + 1],
return num;
}
-static void
+void
FreeNameList()
{
word_t *p, *temp;