aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNay <dnpd.dd@gmail.com>2013-09-04 13:56:33 -0700
committerNay <dnpd.dd@gmail.com>2013-09-04 13:56:33 -0700
commitd5d0802262637d5b32555ec453b2034b6be247b8 (patch)
treebad8c6f46766b46e0c0f361b12aaf4c241ad6160
parent0e80c9ea4867dd9c0ba2a00a771eab1bcdabd773 (diff)
parent5eff0b62aea32174eb32ffb5fb71534a6bf43c6f (diff)
Merge pull request #10718 from jackpoz/console_fix
Core/Command Line: Fix memory leak
-rw-r--r--src/server/worldserver/CommandLine/CliRunnable.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index e136269e2a0..1ebb58eef1a 100644
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -175,6 +175,8 @@ void CliRunnable::run()
{
#if PLATFORM == PLATFORM_WINDOWS
printf("TC>");
+#else
+ free(command_str);
#endif
continue;
}
@@ -184,6 +186,8 @@ void CliRunnable::run()
{
#if PLATFORM == PLATFORM_WINDOWS
printf("TC>");
+#else
+ free(command_str);
#endif
continue;
}
@@ -192,6 +196,7 @@ void CliRunnable::run()
sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished));
#if PLATFORM != PLATFORM_WINDOWS
add_history(command.c_str());
+ free(command_str);
#endif
}
else if (feof(stdin))