summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-01 22:18:51 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-01 22:18:51 +0300
commitfcd97e7fade4354d3949426ca255732d58b55b97 (patch)
treee8d90fe744cea5a7da4ad48aa87bc72aba810981 /src
parentfb3f83b79ea7db00225d406f6e579c08961e2f38 (diff)
downloadplugin-fcd97e7fade4354d3949426ca255732d58b55b97.tar.gz
plugin-fcd97e7fade4354d3949426ca255732d58b55b97.tar.bz2
plugin-fcd97e7fade4354d3949426ca255732d58b55b97.tar.xz
plugin-fcd97e7fade4354d3949426ca255732d58b55b97.zip
map: in online list remove temp buffer always.
Diffstat (limited to 'src')
-rw-r--r--src/map/map.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 8b0fd6a..a4376fe 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -57,19 +57,25 @@ void emap_online_list(int fd)
struct SessionExt *data1 = session_get(fd);
if (!data1)
+ {
+ aFree(buf);
return;
+ }
const time_t t = time(NULL);
if (data1->onlinelistlasttime + 15 >= t)
{ // not more than 1 per 15 seconds
data1->onlinelistlasttime = t;
+ aFree(buf);
return;
}
struct map_session_data* ssd = (struct map_session_data*)session[fd]->session_data;
if (!ssd)
+ {
+ aFree(buf);
return;
-
+ }
const bool showVersion = pc_has_permission(ssd, permission_show_client_version_flag);
const int gpoupLevel = pc_get_group_level(ssd);