summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-06-16 13:11:17 +0800
committerwens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-06-16 13:11:17 +0800
commitedd7b94a33f001c9a8f0808002dde2e8572caf17 (patch)
treebbe4c40d7d4a89d3723c395abe8a12f50f66947c
parent814cca9e58ae0d525ec4acb6bae4e5ff4908ef50 (diff)
downloadpttbbs-edd7b94a33f001c9a8f0808002dde2e8572caf17.tar
pttbbs-edd7b94a33f001c9a8f0808002dde2e8572caf17.tar.gz
pttbbs-edd7b94a33f001c9a8f0808002dde2e8572caf17.tar.bz2
pttbbs-edd7b94a33f001c9a8f0808002dde2e8572caf17.tar.lz
pttbbs-edd7b94a33f001c9a8f0808002dde2e8572caf17.tar.xz
pttbbs-edd7b94a33f001c9a8f0808002dde2e8572caf17.tar.zst
pttbbs-edd7b94a33f001c9a8f0808002dde2e8572caf17.zip
prevent memory leak
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4363 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/friend.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/friend.c b/pttbbs/mbbsd/friend.c
index b30bbd01..817cce0c 100644
--- a/pttbbs/mbbsd/friend.c
+++ b/pttbbs/mbbsd/friend.c
@@ -462,7 +462,7 @@ friend_edit(int type)
move(0, 40);
prints("(名單上限: %d 人)", friend_max[type]);
count = 0;
- Vector_init(&namelist, IDLEN + 1);
+ Vector_clear(&namelist, IDLEN + 1);
if ((fp = fopen(fpath, "r"))) {
move(3, 0);
@@ -538,6 +538,7 @@ friend_edit(int type)
} else
break;
}
+ Vector_delete(&namelist);
if (dirty) {
move(2, 0);
outs("更新資料中..請稍候.....");